<!-- eslint-disable-next-line sw-deprecation-rules/no-twigjs-blocks -->
{% block sw_settings_mailer_smtp %}
<div class="sw-settings-mailer-smtp">
    <!-- eslint-disable-next-line sw-deprecation-rules/no-twigjs-blocks -->
    {% block sw_settings_mailer_smtp_host %}
    <sw-text-field
        v-model:value="mailerSettings['core.mailerSettings.host']"
        :label="$tc('sw-settings-mailer.card-smtp.host')"
        :placeholder="$tc('sw-settings-mailer.card-smtp.host-placeholder')"
        :error="hostError"
        required
        @update:value="$emit('host-changed')"
    />
    {% endblock %}

    <!-- eslint-disable-next-line sw-deprecation-rules/no-twigjs-blocks -->
    {% block sw_settings_mailer_smtp_port %}
    <sw-number-field
        v-model:value="mailerSettings['core.mailerSettings.port']"
        :max="65536"
        :label="$tc('sw-settings-mailer.card-smtp.port')"
        :placeholder="$tc('sw-settings-mailer.card-smtp.port-placeholder')"
        :error="portError"
        required
        @update:value="$emit('port-changed')"
    />
    {% endblock %}

    <!-- eslint-disable-next-line sw-deprecation-rules/no-twigjs-blocks -->
    {% block sw_settings_mailer_smtp_username %}
    <sw-text-field
        v-model:value="mailerSettings['core.mailerSettings.username']"
        :label="$tc('sw-settings-mailer.card-smtp.username')"
        :placeholder="$tc('sw-settings-mailer.card-smtp.username-placeholder')"
    />
    {% endblock %}

    <!-- eslint-disable-next-line sw-deprecation-rules/no-twigjs-blocks -->
    {% block sw_settings_mailer_smtp_password %}
    <sw-password-field
        v-model:value="mailerSettings['core.mailerSettings.password']"
        :label="$tc('sw-settings-mailer.card-smtp.password')"
        :placeholder="$tc('sw-settings-mailer.card-smtp.password-placeholder')"
    />
    {% endblock %}

    <!-- eslint-disable-next-line sw-deprecation-rules/no-twigjs-blocks -->
    {% block sw_settings_mailer_smtp_encryption %}
    <sw-single-select
        v-model:value="mailerSettings['core.mailerSettings.encryption']"
        :label="$tc('sw-settings-mailer.card-smtp.encryption')"
        :placeholder="$tc('sw-settings-mailer.card-smtp.encryption-placeholder')"
        :options="encryptionOptions"
        show-clearable-button
    />
    {% endblock %}

    <!-- eslint-disable-next-line sw-deprecation-rules/no-twigjs-blocks -->
    {% block sw_settings_mailer_smtp_sender_address %}
    <sw-text-field
        v-model:value="mailerSettings['core.mailerSettings.senderAddress']"
        :label="$tc('sw-settings-mailer.card-smtp.sender-address')"
        :placeholder="$tc('sw-settings-mailer.card-smtp.sender-address-placeholder')"
        validation="email"
    />
    {% endblock %}

    <!-- eslint-disable-next-line sw-deprecation-rules/no-twigjs-blocks -->
    {% block sw_settings_mailer_smtp_delivery_address %}
    <sw-text-field
        v-model:value="mailerSettings['core.mailerSettings.deliveryAddress']"
        :label="$tc('sw-settings-mailer.card-smtp.delivery-address')"
        :placeholder="$tc('sw-settings-mailer.card-smtp.delivery-address-placeholder')"
        :help-text="$tc('sw-settings-mailer.card-smtp.delivery-address-helptext')"
        validation="email"
    />
    {% endblock %}

    <!-- eslint-disable-next-line sw-deprecation-rules/no-twigjs-blocks -->
    {% block sw_settings_mailer_smtp_disable_delivery %}
    <sw-switch-field
        v-model:value="mailerSettings['core.mailerSettings.disableDelivery']"
        :label="$tc('sw-settings-mailer.card-smtp.disable-delivery')"
    />
    {% endblock %}
</div>
{% endblock %}
