altcom_ajax:
  namespace: "Templates/TM - Utilities/Altcom Ajax"
  use: "@templates/utilities/altcom-ajax/altcom-ajax.twig"
  label: Altcom ajax
  description: Altcom ajax examples

  fields:

    pattern_id:
      type: text
      label: Pattern
      preview: "altcom_ajax_pattern"

    pattern_vars:
      type: object
      label: Vars
      preview:
        div_id: 'new-element-id'
        text: 'Hello you again'

    target_id:
      type: text
      label: Target
      preview: my-target-id

    button_text:
      type: text
      label: Text
      preview: Ajax load

altcom_ajax_toggle:
  namespace: "Templates/TM - Utilities/Altcom Ajax"
  use: "@templates/utilities/altcom-ajax/aa-toggle.html.twig"
  label: Ajax Toggle
  description: Ajax Toggle

  fields:

    target:
      type: text
      label: Target selector ID
      preview: "my-target"

    on:
      type: text
      label: On text
      preview: "On"

    off:
      type: text
      label: Off text
      preview: "Off"

  settings:

    type:
      type: select
      label: Type of button, dbl or sgl.
      preview: dbl
      default_value: dbl
      options:
        sgl: Single
        dbl: Double

    initial_state:
      type: select
      label: Initial state
      preview: on
      default_value: on
      options:
        on: on
        off: off

    status:
      label: Status
      desciption: Bootstrap status
      type: select
      options:
        primary: Primary
        secondary: Secondary
        success: Success
        danger: Danger
        warning: Warning
        info: Info
        light: Light
        dark: Dark
      default_value: secondary
      preview: secondary

altcom_ajax_update:
  namespace: "Templates/TM - Utilities/Altcom Ajax"
  use: "@templates/utilities/altcom-ajax/aa-update.html.twig"
  label: Ajax Update
  description: Ajax Update

  fields:

    target:
      type: text
      label: Target selector ID
      preview: "my-target"

    updated:
      type: text
      label: Updated text
      preview: "Updated"
