tm_itinerary_item:
  namespace: "Organisms/TM - Itinerary"
  use: "@organisms/tm-itin/tm-itinerary.twig"
  label: Basket item
  description: Basket item
  libraries:
    - tm_itinerary_item_lib:
        css:
          component:
            ../styles/tm-itinerary.css: { weight: 10 }
        js:
          ../behaviors/tm-itinerary.js: { }

  fields:
    iid:
      type: text
      label: Itinerary ID
      preview: itin-123
    img_src:
      type: text
      label: Image url
      preview: 'https://picsum.photos/700/400?rnd=1'
    img_alt:
      type: text
      label: Image alt
      preview: 'Image of the offer'
    title:
      type: text
      label: Title
      preview: 'Offer for day out in Norfolk'
    tags:
      type: object
      label: Tags
      description: Tags
      preview:
        - name: "A tag"
          url: "/"
        - name: "Another tag"
          url: "/"
        - name: "Yet another tag"
          url: "/"
    description:
      type: text
      label: Description
      preview: "Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. At ultrices mi tempus imperdiet nulla malesuada pellentesque elit eget. Ipsum faucibus vitae aliquet nec ullamcorper. Phasellus faucibus scelerisque eleifend donec pretium vulputate. Ultricies tristique nulla aliquet enim tortor at. Nec feugiat nisl pretium fusce. Purus sit amet volutpat consequat mauris nunc congue. Scelerisque viverra mauris."
    location:
      type: text
      label: Location
      preview: Norfolk
    date:
      type: text
      label: Date
      preview: "now"
    item_url:
      type: text
      label: Item url
      preview: "/somewhere"
    remove_url:
      type: text
      label: Remove url
      preview: "/somewhere/remove"
    print_url:
      type: text
      label: Print url
      preview: "/somewhere/print"

  settings:

    item_link:
      type: textfield
      label: Read more text
      preview: Read more
      default_value: Read more

    print_link:
      type: textfield
      label: Print link text
      preview: Print voucher
      default_value: Print voucher

    remove_link:
      type: textfield
      label: Remove link text
      preview: Remove
      default_value: Remove

tm_itinerary_print_header:
  namespace: "Organisms/TM - Itinerary"
  use: "@organisms/tm-itin/tm-itinerary-print-header.twig"
  label: Itinerary print header
  description: Itinerary print header

  fields:
    claim_name:
      type: text
      label: Claim name
      preview: 'Joan Smith'
    claim_date:
      type: text
      label: Claim date
      preview: 'now'
    claim_items:
      type: object
      label: Items data
      preview:
        - title: The View from The Shard
          expiry: 'now'
          where: London
          station: London
          coupon_code: 6N6THN
        - title: The View from The Shard
          expiry: 'now'
          where: London
          station: London
          coupon_code: Missing coupon code
  settings:
    coupon_offers:
      type: boolean
      label: Coupon offers
      preview: true

tm_itinerary_print_voucher:
  namespace: "Organisms/TM - Itinerary"
  use: "@organisms/tm-itin/tm-itinerary-print-voucher.twig"
  label: Itinerary print voucher
  description: Itinerary print voucher

  fields:
    claim_name:
      type: text
      label: Claim name
      preview: 'Joan Smith'
    claim_email:
      type: text
      label: Claim email
      preview: 'my@email.com'
    toc_ref:
      type: text
      label: TOC Ref
      preview: TOC123ABC
    offer_title:
      type: text
      label: Offer title
      preview: The View from The Shard

tm_itinerary_review:
  namespace: "Organisms/TM - Itinerary"
  use: "@organisms/tm-itin/tm-itinerary-review.twig"
  label: Itinerary review
  description: Itinerary review

  fields:
    form_items:
      label: Form data
      type: object
      preview:
      - name: name
        title: Name
        value: Joan Smith
      - name: email
        title: Email
        value: joan@smith.com
      - name: town
        title: Town
        value: London
      - name: county
        title: County
        value: London
      - name: postcode
        title: Postcode
        value: SE1 23X
      - name: travel-date
        title: Travel date
        value: May 31, 2022
      - name: travel-location
        title: Station origin travel
        value: Salford Central

    claim_items:
      type: object
      label: Items data
      preview:
        - title: The View from The Shard
          expiry: 'now'
          where: London
          station: London
          iid: 123
          type: Offer
        - title: The View from The Shard
          expiry: 'now'
          where: London
          station: London
          iid: 456
          type: Offer
