#import "@preview/cetz:0.3.4"
#import "theme.typ": *

#let ore-sorting-flow() = figure(
  caption: [智能分选系统流程（CeTZ 矢量示意）],
  cetz.canvas(length: 0.85cm, {
    import cetz.draw: *
    let w = 1.7
    let gap = 0.55
    let labels = ("采集", "推理", "分选", "产出")
    for (i, label) in labels.enumerate() {
      let x = i * (w + gap)
      rect(
        (x, 0),
        (x + w, 1),
        radius: 0.12,
        fill: color-brand.lighten(72%),
        stroke: 1pt + color-brand,
      )
      content((x + w / 2, 0.5), align(center + horizon)[
        #text(font: body-font, size: text-xs, fill: color-body)[#label]
      ])
      if i < labels.len() - 1 {
        line(
          (x + w, 0.5),
          (x + w + gap, 0.5),
          stroke: 1pt + color-muted,
          mark: (end: ">", fill: color-muted),
        )
      }
    }
  }),
)
