# Schema for the configuration files of the SMS Phone Number module.

# Storage schema.
field.storage_settings.sms_phone_number:
  type: mapping
  label: Storage settings
  mapping:
    unique:
      type: integer
      label: Uniqueness

# Field settings schema.
field.field_settings.sms_phone_number:
  type: mapping
  label: Field settings
  mapping:
    allowed_countries:
      type: sequence
      label: Allowed Countries
      sequence:
        type: string
        label: Country
    allowed_types:
      type: sequence
      label: Allowed types
      sequence:
        type: integer
        label: Type
    extension_field:
      type: boolean
      label: Enable extension field
    verify:
      type: string
      label: Verification
    message:
      type: string
      label: Verification message

# Widget settings schema.
field.widget.settings.sms_phone_number_default:
  type: mapping
  label: Widget settings
  mapping:
    default_country:
      type: string
      label: Default Country
    placeholder:
      type: string
      label: Placeholder

# Custom settings schema.
sms_phone_number.settings:
  type: config_object
  label: 'SMS Phone Number settings'
  mapping:
    tfa_field:
      type: string
      label: 'TFA User Field'
    verification_secret:
      label: 'Verification Secret'
      type: string

# Formatter settings schema.
field.formatter.settings.sms_phone_number_country:
  type: field.formatter.settings.phone_number_country
  label: Country formatter settings

field.formatter.settings.sms_phone_number_international:
  type: field.formatter.settings.phone_number_international
  label: International Number formatter settings

field.formatter.settings.sms_phone_number_local:
  type: field.formatter.settings.phone_number_local
  label: Local number formatter settings
