<div {{ attributes.defaults({ 'data-review-opt-out': '' }) }}>
    {% if saved %}
        <div data-review-opt-out-status class="rounded border border-green-300 bg-green-50 p-4 text-green-900" role="status">
            {{ 'marketing.review.opt_out.saved'|trans }}
        </div>
    {% elseif this.alreadyOptedOut %}
        <div data-review-opt-out-status class="rounded border p-6" role="status">
            {{ 'marketing.review.opt_out.already_saved'|trans }}
        </div>
    {% else %}
        <button
            class="inline-flex items-center justify-center rounded px-6 py-3 font-semibold disabled:cursor-not-allowed disabled:opacity-50"
            type="button"
            data-action="live#action"
            data-live-action-param="confirmOptOut"
            data-loading="addAttribute(disabled)"
        >
            {{ 'marketing.review.opt_out.confirm'|trans }}
        </button>
    {% endif %}
</div>
