kind: Solution
version: v0
assetsPath: ./assets
router:
  kind: Router
  routes:
    - frame: my-home-frame
frames:
  my-home-frame:
    kind: Frame
    layout:
      kind: ColumnLayout
      widths: [300px, 20px, 300px]
      areas: [my-control-panel, "", my-image]
    contents:
      my-model:
        kind: Model
        modelFile: select-image.gh
        subscribe:
          - kind: ControlPanel
            frame: my-home-frame
            source: my-control-panel
      my-control-panel:
        kind: ControlPanel
        controls:
          food: # MATCH GH OUTPUT
            kind: Dropdown
            label: What do you want to eat?
            value: select-food
            choices:
              - label: Select your food?
                value: select-food
              - label: Fruit
                value: fruit
              - label: Veggies
                value: veggies

          fruit: # MATCH GH OUTPUT
            kind: Dropdown
            label: What fruit do you want to eat?
            value: select-fruit
            choices:
              - label: Select your fruit?
                value: select-fruit
              - label: Apples
                value: apples
              - label: Blueberries
                value: blueberries
            hideWhen:
              kind: NotEqual
              control: food
              value: fruit

          veggies: # MATCH GH OUTPUT
            kind: Dropdown
            label: What veggies do you want to eat?
            value: select-veggies
            choices:
              - label: Select your veggies
                value: select-veggies
              - label: Eggplant
                value: eggplant
              - label: Peppers
                value: peppers
            hideWhen:
              kind: NotEqual
              control: food
              value: veggies

      my-image:
        kind: Image
        subscribe:
          - kind: Model
            frame: my-home-frame
            source: my-model
            setImagePath: image-path
