import { html } from '//resources/polymer/v3_0/polymer/polymer_bundled.min.js';
export function getTemplate() {
    return html `<!--_html_template_start_--><style include="settings-shared your-saved-info-shared">
  .card {
    overflow: hidden;
  }
</style>

<settings-subpage page-title="$i18n{shoppingCardTitle}" class="multi-card">
  <div class="card">
    <settings-toggle-button id="optInToggle"
        disabled="[[optInToggleDisabled_(
            enhancedAutofillEligibleUser_, enhancedAutofillOptedIn_,
            autofillAddOtherDatatypesPrefIsEnabled_,
            prefs.autofill.profile_enabled.value, prefsInitialized_)]]"
        on-settings-boolean-control-change="onOptInToggleChange_"
        pref="[[shoppingOptedIn_]]"
        no-extension-indicator
        label="$i18n{shoppingOptInToggleLabel}"
        sub-label="$i18n{shoppingOptInToggleSubLabel}">
    </settings-toggle-button>
    <!-- TODO(crbug.com/512202637) Add strings and make them translatable.-->
    <template is="dom-if" if="[[showSuggestionsFromGeminiSettings_]]">
      <cr-link-row label="Lorem Ipsum" sub-label="lorem ipsum"
          id="suggestionsFromGeminiLinkRow"
          on-click="onSuggestionsFromGeminiClick_" class="hr">
      </cr-link-row>
    </template>
    <template is="dom-if" if="[[extensionControlledIndicatorIsVisible_(
            prefs.autofill.profile_enabled.extensionId, prefsInitialized_)]]">
      <div class="cr-row continuation">
        <extension-controlled-indicator class="flex"
            id="autofillExtensionIndicator"
            extension-id=
                "[[prefs.autofill.profile_enabled.extensionId]]"
            extension-name=
                "[[prefs.autofill.profile_enabled.controlledByName]]"
            extension-can-be-disabled="[[
                prefs.autofill.profile_enabled.extensionCanBeDisabled
                ]]">
        </extension-controlled-indicator>
      </div>
    </template>
  </div>

  <!-- Entities list card -->
  <div class="card">
    <!-- TODO(crbug.com/493434633): Replace with custom list. -->
    <settings-autofill-ai-entries-list
        list-title="$i18n{shoppingCardTitle}"
        allowed-entity-types="[[getAllowedEntityTypes_()]]"
        allow-editing-pref="[[
            prefs.autofill.autofill_ai.shopping_entities_enabled]]"
        prefs="{{prefs}}">
    </settings-autofill-ai-entries-list>
  </div>
</settings-subpage><!--_html_template_end_-->`;
}
