---
features:

  juno-onboarding:
    description: A feature that shows the onboarding flow.

    variables:
      conditions:
        description: >
          A collection of out the box conditional expressions to be
          used in determining whether a card should show or not.
          Each entry maps to a valid JEXL expression.
        type: Map<ConditionName, String>
        string-alias: ConditionName
        default: {
          ALWAYS: "true",
          NEVER: "false"
        }
      cards:
        description: Collection of user facing onboarding cards.
        type: Map<OnboardingCardKey, OnboardingCardData>
        string-alias: OnboardingCardKey
        default:
            terms-of-service:
              card-type: terms-of-service
              title: onboarding_welcome_to_firefox
              body: onboarding_terms_of_service_sub_header_2
              ordering: 1
              image-res: ic_firefox
              primary-button-label: onboarding_term_of_service_agree_and_continue_button_label_2
              extra-data:
                term-of-service-data:
                  line-one-text: onboarding_term_of_service_line_one_2
                  line-one-link-text: onboarding_term_of_service_line_one_link_text_2
                  line-two-text: onboarding_term_of_service_line_two_2
                  line-two-link-text: onboarding_term_of_service_line_two_link_text
                  line-three-text: onboarding_term_of_service_line_three
                  line-three-link-text: onboarding_term_of_service_line_three_link_text

            default-browser:
              card-type: default-browser
              title: juno_onboarding_default_browser_title_nimbus_2
              ordering: 10
              body: juno_onboarding_default_browser_description_nimbus_3
              image-res: ic_onboarding_welcome
              primary-button-label: juno_onboarding_default_browser_positive_button
              secondary-button-label: juno_onboarding_default_browser_negative_button

            add-search-widget:
              card-type: add-search-widget
              title: juno_onboarding_add_search_widget_title
              body: juno_onboarding_add_search_widget_description
              image-res: ic_onboarding_search_widget
              ordering: 15
              primary-button-label: juno_onboarding_add_search_widget_positive_button
              secondary-button-label: juno_onboarding_add_search_widget_negative_button

            sync-sign-in:
              card-type: sync-sign-in
              title: juno_onboarding_sign_in_title_2
              body: juno_onboarding_sign_in_description_3
              image-res: ic_onboarding_sync
              ordering: 20
              primary-button-label: juno_onboarding_sign_in_positive_button
              secondary-button-label: juno_onboarding_sign_in_negative_button

            notification-permission:
              card-type: notification-permission
              title: juno_onboarding_enable_notifications_title_nimbus_2
              body: juno_onboarding_enable_notifications_description_nimbus_2
              image-res: ic_notification_permission
              ordering: 30
              primary-button-label: juno_onboarding_enable_notifications_positive_button
              secondary-button-label: juno_onboarding_enable_notifications_negative_button

            theme-selection:
              card-type: theme-selection
              title: onboarding_customize_theme_title
              body: onboarding_customize_theme_description
              image-res: ic_pick_a_theme
              ordering: 33
              primary-button-label: onboarding_save_and_continue_button
              extra-data:
                customization-theme-data:
                  - theme-type: theme-system
                    label: onboarding_customize_theme_system_option
                    image-res: ic_pick_a_theme_system_auto
                  - theme-type: theme-light
                    label: onboarding_customize_theme_light_option
                    image-res: ic_pick_a_theme_light
                  - theme-type: theme-dark
                    label: onboarding_customize_theme_dark_option
                    image-res: ic_pick_a_theme_dark

            toolbar-placement:
              card-type: toolbar-placement
              title: onboarding_customize_toolbar_title
              body: onboarding_customize_toolbar_description
              image-res: ic_onboarding_customize_toolbar
              ordering: 37
              primary-button-label: onboarding_save_and_continue_button
              extra-data:
                customization-toolbar-data:
                  - toolbar-type: toolbar-top
                    label: onboarding_customize_toolbar_top_option
                    image-res: ic_onboarding_top_toolbar
                  - toolbar-type: toolbar-bottom
                    label: onboarding_customize_toolbar_bottom_option
                    image-res: ic_onboarding_bottom_toolbar

            marketing:
              card-type: marketing-data
              title: onboarding_marketing_title
              body: onboarding_marketing_body
              ordering: 40
              image-res: ic_onboarding_welcome
              primary-button-label: onboarding_marketing_positive_button
              extra-data:
                marketing-data:
                  body-line-one-text: onboarding_marketing_learn_more
                  body-line-one-link-text: onboarding_marketing_learn_more
                  body-line-two-text: onboarding_marketing_opt_in_checkbox
    defaults:
      - channel: developer
        value:
          cards:
            terms-of-service:
              card-type: terms-of-service
              enabled: false
              title: onboarding_welcome_to_firefox
              ordering: 0
              image-res: ic_firefox
              primary-button-label: onboarding_term_of_service_agree_and_continue_button_label_2
              extra-data:
                term-of-service-data:
                  line-one-text: onboarding_term_of_service_line_one_2
                  line-one-link-text: onboarding_term_of_service_line_one_link_text_2
                  line-two-text: onboarding_term_of_service_line_two_2
                  line-two-link-text: onboarding_term_of_service_line_two_link_text
                  line-three-text: onboarding_term_of_service_line_three
                  line-three-link-text: onboarding_term_of_service_line_three_link_text

            default-browser:
              card-type: default-browser
              enabled: true
              title: juno_onboarding_default_browser_title_nimbus_2
              ordering: 5
              body: juno_onboarding_default_browser_description_nimbus_3
              image-res: ic_onboarding_welcome
              primary-button-label: juno_onboarding_default_browser_positive_button
              secondary-button-label: juno_onboarding_default_browser_negative_button

            add-search-widget:
              enabled: true
              card-type: add-search-widget
              title: juno_onboarding_add_search_widget_title
              body: juno_onboarding_add_search_widget_description
              image-res: ic_onboarding_search_widget
              ordering: 10
              primary-button-label: juno_onboarding_add_search_widget_positive_button
              secondary-button-label: juno_onboarding_add_search_widget_negative_button

            sync-sign-in:
              enabled: true
              card-type: sync-sign-in
              title: juno_onboarding_sign_in_title_2
              body: juno_onboarding_sign_in_description_3
              image-res: ic_onboarding_sync
              ordering: 15
              primary-button-label: juno_onboarding_sign_in_positive_button
              secondary-button-label: juno_onboarding_sign_in_negative_button

            notification-permission:
              enabled: true
              card-type: notification-permission
              title: juno_onboarding_enable_notifications_title_nimbus_2
              body: juno_onboarding_enable_notifications_description_nimbus_2
              image-res: ic_notification_permission
              ordering: 20
              primary-button-label: juno_onboarding_enable_notifications_positive_button
              secondary-button-label: juno_onboarding_enable_notifications_negative_button

            theme-selection:
              card-type: theme-selection
              enabled: false
              title: onboarding_customize_theme_title
              body: onboarding_customize_theme_description
              image-res: ic_pick_a_theme
              ordering: 30
              primary-button-label: onboarding_save_and_continue_button
              extra-data:
                customization-theme-data:
                  - theme-type: theme-system
                    label: onboarding_customize_theme_system_option
                    image-res: ic_pick_a_theme_system_auto
                  - theme-type: theme-light
                    label: onboarding_customize_theme_light_option
                    image-res: ic_pick_a_theme_light
                  - theme-type: theme-dark
                    label: onboarding_customize_theme_dark_option
                    image-res: ic_pick_a_theme_dark

            toolbar-placement:
              card-type: toolbar-placement
              enabled: false
              title: onboarding_customize_toolbar_title
              body: onboarding_customize_toolbar_description
              image-res: ic_onboarding_customize_toolbar
              ordering: 35
              primary-button-label: onboarding_save_and_start_button
              extra-data:
                customization-toolbar-data:
                  - toolbar-type: toolbar-top
                    label: onboarding_customize_toolbar_top_option
                    image-res: ic_onboarding_top_toolbar
                  - toolbar-type: toolbar-bottom
                    label: onboarding_customize_toolbar_bottom_option
                    image-res: ic_onboarding_bottom_toolbar

            marketing-data:
              card-type: marketing-data
              enabled: false
              title: onboarding_marketing_title
              body: onboarding_marketing_body
              image-res: ic_onboarding_welcome
              ordering: 40
              primary-button-label: onboarding_marketing_positive_button
              extra-data:
                marketing-data:
                  body-line-one-text: onboarding_marketing_learn_more
                  body-line-one-link-text: onboarding_marketing_learn_more
                  body-line-two-text: onboarding_marketing_opt_in_checkbox

objects:

  OnboardingCardData:
    description: An object to describe a user facing onboarding card.
    fields:
      card-type:
        type: OnboardingCardType
        description: The type of the card.
        # This should never be defaulted.
        default: default-browser
      enabled:
        type: Boolean
        description: If true, this card is shown to the user.
        default: true
      title:
        type: Text
        description: The title text displayed to the user.
        # This should never be defaulted.
        default: ""
      body:
        type: Text
        description: The message text displayed to the user. May contain linkable text.
        # This should never be defaulted.
        default: ""
      image-res:
        type: Image
        description: The resource id of the image to be displayed.
        # This should never be defaulted.
        default: ic_onboarding_welcome
      ordering:
        type: Int
        description: Used to sequence the cards.
        # This should never be defaulted.
        default: 0
      primary-button-label:
        type: Text
        description: The text to display on the primary button.
        # This should never be defaulted.
        default: ""
      secondary-button-label:
        type: Text
        description: The text to display on the secondary button.
        # This can be defaulted if the card type does not required it.
        default: ""
      prerequisites:
        type: List<ConditionName>
        description: >
          A list of strings corresponding to targeting expressions.
          The card will be shown if all expressions are `true` and if
          no expressions in the `disqualifiers` table are true, or
          if the `disqualifiers` table is empty.
        default: [ ALWAYS ]
      disqualifiers:
        type: List<ConditionName>
        description: >
          A list of strings corresponding to targeting expressions.
          The card will not be shown if any expression is `true`.
        default: [ NEVER ]
      extra-data:
        type: Option<ExtraCardData>
        description: Optional extra data for cards that require additional data.
        default: null

  ExtraCardData:
    description: Holds data for cards that require additional data, e.g. add-ons, toolbar placement cards.
    fields:
      add-ons-data:
        type: List<AddOnData>
        description: >
          An optional list of add-ons which will be shown in add-on onboarding card.
        default: []
      customization-toolbar-data:
        type: List<CustomizationToolbarData>
        description: >
          An optional list of toolbar placements for the toolbar placement card.
        default: []
      customization-theme-data:
        type: List<CustomizationThemeData>
        description: An optional list of theme choices for the theme selection card.
        default: []

      term-of-service-data:
        type: Option<TermsOfServiceData>
        description: >
          An optional terms of service data for the onboarding card.
        default: null
      marketing-data:
        type: Option<MarketingData>
        description: >
          An optional marketing data for the onboarding card.
        default: null

  AddOnData:
      description: An object to describe an add-on to be installed from the onboarding card.
      fields:
        id:
          type: Text
          description: The identifier for this add-on.
          # This should never be defaulted.
          default: ""
        install-url:
          type: Text
          description: The url from where the add-on can be installed.
          # This should never be defaulted.
          default: ""
        name:
          type: Text
          description: The name of the add-on to be displayed to the user.
          # This should never be defaulted.
          default: ""
        description:
          type: Text
          description: A small description of the add-on to be displayed to the user.
          # This should never be defaulted.
          default: ""
        icon-res:
          type: Image
          description: The resource id of the icon of the add-on to be displayed.
          # This should never be defaulted.
          default: ic_onboarding_welcome
        average-rating:
          type: String
          description: The average rating of the add-on.
          # This should never be defaulted.
          default: "0.0"
        review-count:
          type: String
          description: The amount of reviews the add-on has.
          # This should never be defaulted.
          default: "0.0"

  CustomizationToolbarData:
    description: An object to describe the placement of the toolbar.
    fields:
      toolbar-type:
        type: ToolbarType
        description: The type of toolbar placement.
        # This should never be defaulted.
        default: toolbar-top
      label:
        type: Text
        description: Display text for the toolbar placement option (e.g. "Top placement").
        # This should never be defaulted.
        default: ""
      image-res:
        type: Image
        description: The resource id of toolbar placement image.
        # This should never be defaulted.
        default: ic_onboarding_customize_toolbar

  CustomizationThemeData:
    description: Defines an option for theme selection.
    fields:
      theme-type:
        type: ThemeType
        description: The type of the theming option.
        # This should never be defaulted.
        default: theme-system
      label:
        type: Text
        description: Display text for the theme option (e.g., "Light Theme").
        # This should never be defaulted.
        default: ""
      image-res:
        type: Image
        description: The resource id of the image to be displayed.
        # This should never be defaulted.
        default: ic_pick_a_theme_system_auto

  TermsOfServiceData:
    description: An object to describe the terms of service onboarding card.
    fields:
      line-one-text:
        type: Text
        description: The text for line one.
        # This should never be defaulted.
        default: ""
      line-one-link-text:
        type: Text
        description: The text for the link of line one.
        # This should never be defaulted.
        default: ""
      line-one-link-url:
        type: Text
        description: The url for the link of line one.
        # This should never be defaulted.
        default: ""
      line-two-text:
        type: Text
        description: The text for line two.
        # This should never be defaulted.
        default: ""
      line-two-link-text:
        type: Text
        description: The text for the link of line two.
        # This should never be defaulted.
        default: ""
      line-two-link-url:
        type: Text
        description: The url for the link of line two.
        # This should never be defaulted.
        default: ""
      line-three-text:
        type: Text
        description: The text for line three.
        # This should never be defaulted.
        default: ""
      line-three-link-text:
        type: Text
        description: The text for the link of line three.
        # This should never be defaulted.
        default: ""

  MarketingData:
    description: An object to describe the marketing data onboarding card.
    fields:
      body-line-one-text:
        type: Text
        description: The text for line one of the body.
        default: ""
      body-line-one-link-text:
        type: Text
        description: The link text from line one of the body.
        default: ""
      body-line-two-text:
        type: Text
        description: The text for line two of the body.
        default: ""

enums:

  OnboardingCardType:
    description: An enum to describe a type of card.
    variants:
      default-browser:
        description: Allows user to set Firefox as the default browser.
      sync-sign-in:
        description: Allows user to sync with a Firefox account.
      notification-permission:
        description: Allows user to enable notification permission.
      add-search-widget:
        description: Allows user to add search widget to homescreen.
      add-ons:
        description: Allows user to install add-ons from onboarding.
      toolbar-placement:
        description: Allows user to choose the toolbar position.
      theme-selection:
        description: Allows user to choose between dark and light themes.
      terms-of-service:
        description: Page to display the terms of services.
      marketing-data:
        description: Allows user to opt out of marketing data collection.

  ToolbarType:
    description: An enum to describe a toolbar placement option.
    variants:
      toolbar-top:
        description: Sets the toolbar placement on the top.
      toolbar-bottom:
        description: Sets the toolbar placement on the bottom.

  ThemeType:
    description: An enum to describe a theme selection option.
    variants:
      theme-system:
        description: Adapts the theme to match the device's system setting.
      theme-light:
        description: Sets the theme to light mode.
      theme-dark:
        description: Sets the theme to dark mode.
