<%= button_tag type: "button", name: "toggle", data: @data,
      role: "switch", aria: { checked: @enabled.to_s },
      tabindex: @tabindex, disabled: !@input_enabled,
      class: "#{ @enabled ? 'bg-blue-600' : 'bg-gray-200' }
              #{ @class_names.present? ? @class_names : '' }
              relative inline-flex h-6 w-11 flex-shrink-0 cursor-pointer
              rounded-full border-2 border-transparent transition-colors
              duration-200 ease-in-out focus:outline-none focus:ring-2
              focus:ring-blue-600 focus:ring-offset-2" do %>
  <span class="sr-only"><%= @button_text %></span>
  <span aria-hidden="true" data-settings--toggle-target="switch"
        class="<%= @enabled ? 'translate-x-5' : 'translate-x-0' %>
               pointer-events-none inline-block h-5 w-5 transform rounded-full
               bg-white shadow ring-0 transition duration-200 ease-in-out"></span>
<% end %>
