offer_content:
  namespace: "Organisms/TM - Offers"
  use: "@organisms/tm-off/offer-content/offer-content.twig"
  label: Offer content
  description: Offer content
  libraries:
    - offer_content_lib:
        css:
          component:
            ../styles/offer-content.css: { }

  fields:
    nid:
      type: text
      label: ID
      preview: '123'
    offer_description:
      type: text
      label: Offer description
      preview: "<p>Offer description - Offer description - Ecce, magnum caesium!Sunt aonideses reperire mirabilis, camerarius magisteres. Lapsuss accelerare!Cum sectam manducare, omnes monses resuscitabo camerarius, barbatus quadraes. Manducare diligenter ducunt ad mirabili</p>"
    intro_text:
      type: text
      label: Intro text
      preview: "<p>Intro text - Intro text - Ecce, magnum caesium!Sunt aonideses reperire mirabilis, camerarius magisteres. Lapsuss accelerare!Cum sectam manducare, omnes monses resuscitabo camerarius, barbatus quadraes. Manducare diligenter ducunt ad mirabili</p>"
    ticket_price:
      type: text
      label: Ticket proice
      preview: "£12.00"
    img_src:
      type: text
      label: Image src
      preview: https://picsum.photos/540/260?rnd=a1
    img_alt:
      type: text
      label: Image alt
      preview: "main image alt text"
    main_text:
      type: text
      label: Main text
      preview: "<p>Main text - Ecce, magnum caesium!Sunt aonideses reperire mirabilis, camerarius magisteres. Lapsuss accelerare!Cum sectam manducare, omnes monses resuscitabo camerarius, barbatus quadraes. Manducare diligenter ducunt ad mirabilis poeta. Diatria noceres, tanquam secundus gallus. Navis pius magister est.  Flavum imber semper captiss barcas est. Fugas sunt imbers de secundus decor. Nunquam amor cobaltum. Pol, peritus repressor!</p>"
    disabled_info:
      type: text
      label: Disabled info
      preview: "<p>Please check <a href='https://www.theviewfromtheshard.com/plan-your-visit/accessibility/' rel='noopener' target='_blank' title='The View from The Shard Accessibility' class=''>website</a> for details.</p>"
    restrictions:
      type: text
      label: Restrictions
      preview: "There may be some restrictions for this offer."
    expiry_date:
      type: text
      label: Expiry date
      preview: '2022-12-31T00:00:00+00:00'
    claim_text:
      type: text
      label: Claim message
      preview: "<h2>Enjoy your day out safely</h2><ol><li>You must pre-book your 2FOR1 entry tickets via ‘Online Booking’ on the attraction page. In order to minimise contact, leaflet and paper vouchers are unavailable at this time.</li><li>You must wear face coverings on your train journey, unless exempt.</li><li>Make sure you travel at quieter times and always check the latest travel information on our website or app before you set off.</li></ol><p>If an attraction does not offer ‘Online Booking’, please be aware that this means they are currently unavailable on 2FOR1. We are working with attractions to rejoin, when the time...</p>"
    opening_times:
      type: text
      label: Opening times
      preview: "<p><strong>OFFER TIMES:</strong><br><br>Opening times may vary. Please check <a href='https://www.theviewfromtheshard.com/en/plan-your-visit/opening-times/' rel='noopener noreferrer' target='_blank' title='The View From The Shard Opening Times' class=''>website</a> for details.<br><br><strong>**Tickets are subject to availability; the next available time slot will be offered which may not be immediate**</strong><br></p>"
    telephone:
      type: text
      label: Telephone
      preview: '08444 997111'
    voucher_type:
      type: text
      label: Voucher type
      preview: 'Merlin'
    offer_map:
      type: pattern
      label: Offer map
      preview:
        id: leaflet
    terms:
      type: text
      label: T&Cs
      preview: "<p>Here are some Terms and Conditions. <ul><li>You may not ...</li><li>You may not ...</li><li>You may ...</li><li>You may ...</li></ul></p>"
    getting_there:
      type: text
      label: Getting there
      preview: "<p>How to get there - Sunt aonideses reperire mirabilis, camerarius magisteres. Lapsuss accelerare!Cum sectam manducare, omnes monses resuscitabo camerarius</p>"
    tags:
      type: object
      label: Tags
      description: Tags
      preview:
        - name: "A tag"
          url: "/"
        - name: "Another tag"
          url: "/"
        - name: "Yet another tag"
          url: "/"
    find_out_more_url:
      type: text
      label: More URL
      preview: 'https://gdllondon.seetickets.com/tour/grand-designs-live-excel?offercode=DAYSOUT'
    find_out_more_text:
      type: text
      label: More text
      preview: 'Find out more'
    nearest_station:
      type: object
      label: Nearest station
      preview:
        title: 'Norwich'
        crs: 'NRW'
        link: '/station-page'

  settings:
    version:
      type: select
      label: Version
      preview: master
      default: master
      options:
        master: TOC Master
        sr: TOC SR
    back_link_url:
      type: textfield
      label: Back link url
      preview: '/offer-events'
    enable_coupon_code:
      type: boolean
      label: Enable coupon code
      preview: true
    hide_tickets_button:
      type: boolean
      label: Show tickets button
      preview: false
    coupon_button_text:
      type: textfield
      label: Coupon button text
      preview: Claim coupon code
    coupon_button_ally_text:
      type: textfield
      label: Coupon button ally text
      preview: Claim offer coupon code
    floating_top:
      type: boolean
      label: Top float positioning
      preview: false
    badge_position:
      type: select
      label: Badge position
      description: Where the badge is going to be displayed
      options:
        image: Corner of image
        content: Floating in the content

  variants:
    __default:
      label: TOC Master
    sr:
      label: TOC SR
      settings:
        version: sr
        floating_top: true
        badge_position: content
        back_link_url: false
      fields:
        voucher_type: false

offer_coupon:
  namespace: "Organisms/TM - Offers"
  use: "@organisms/tm-off/offer-content/offer-coupon.twig"
  label: Offer coupon
  description: Offer coupon code - Ajax

  fields:
    coupon_code:
      type: text
      label: Coupon code
      preview: COUPON-1234.0
    coupon_header:
      type: text
      label: Coupon header
      preview: Coupon code
    coupon_url:
      type: text
      label: Coupon url
      preview: '/somewhere'
    coupon_url_text:
      type: text
      label: Coupon url text
      preview: Book now
    coupon_url_ally_text:
      type: text
      label: Coupon url ally text
      preview: 'Go to the attraction page and use the code @code to get the discount.'
    coupon_none_text:
      type: text
      label: Coupon none text
      preview: "<p>There are no coupon codes for this offer, please try again later.</p>"
