nested_child:
  namespace: "Tests/Children"
  use: "@tests/children/_child.twig"
  label: Child A
  visibility: storybook
  fields:
    text:
      type: text
      label: Text
      preview: "Hi - I'm a child"

nested_parent:
  namespace: "Tests/Children"
  use: "@tests/children/_parent.twig"
  label: Parent
  visibility: storybook
  fields:
    child_a:
      type: pattern
      label: 'Child A'
      preview:
        id: 'nested_child'
    child_b:
      type: pattern
      label: 'Child B'
      preview:
        id: 'nested_child'
  variants:
    __default:
      label: "Default"
    happy_children:
      label: "Happy children"
      fields:
        child_a:
          id: 'nested_child'
          fields:
            text: "I am happy"
        child_b:
          id: 'nested_child'
          fields:
            text: "I am happy too"
    sad_children:
      label: "Sad children"
      fields:
        child_a:
          id: 'nested_child'
          fields:
            text: "I'm so sad"
        child_b:
          id: 'nested_child'
          fields:
            text: "Yeh, me too :("

nested_grand_parent:
  namespace: "Tests/Children"
  use: "@tests/children/_grand_parent.twig"
  label: Grand parent
  visibility: storybook
  fields:
    parent:
      type: pattern
      label: 'Parent'
      preview:
        id: 'nested_parent'
        fields:
          child_a:
            id: 'nested_child'
            fields:
              text: "I am not the default"
          child_b:
            id: 'nested_child'
            fields:
              text: "Neither am I default"
  variants:
    __default:
      label: "Default"
    happy_grand_children:
      label: "Happy grand children"
      fields:
        parent:
          id: 'nested_parent'
          variant: 'happy_children'
    blue_grand_children:
      label: "Blue grand children"
      fields:
        parent:
          id: 'nested_parent'
          fields:
            child_a:
              id: 'nested_child'
              fields:
                text: "I'm am blue"
            child_b:
              id: 'nested_child'
              fields:
                text: "Soo blue"
