<% disable_form_submit_check ||= false label ||= nil value ||= nil id ||= nil name ||= nil autocomplete = "off" unless ['new-password', 'current-password'].include?(autocomplete) describedby ||= nil hint ||= nil error_message ||= nil error_items ||= nil data ||= nil if !label raise ArgumentError, "This component requires a label" end %> <% if label %> <%= tag.div class: "gem-c-show-password", data: { module: "show-password", disable_form_submit_check: disable_form_submit_check, show_text: t('components.show_password.show'), hide_text: t('components.show_password.hide'), show_full_text: t('components.show_password.show_password'), hide_full_text: t('components.show_password.hide_password'), announce_show: t('components.show_password.announce_show'), announce_hide: t('components.show_password.announce_hide') } do %> <%= render "govuk_publishing_components/components/input", { label: label, value: value, id: id, name: name, describedby: describedby, hint: hint, error_message: error_message, error_items: error_items, type: "password", autocomplete: autocomplete, data: data, } %> <% end %> <% end %>