<%= content_for :page_title, t(".create_new_api_key") %> <%= settings_section title: nil, subtitle: t(".subtitle") do %> <%= styled_form_with model: @api_key, url: settings_api_key_path, class: "space-y-4" do |form| %> <%= form.text_field :name, placeholder: t(".name_placeholder"), label: t(".name_label"), help_text: t(".name_help_text") %>
<%= form.label :scopes, t(".permissions_label"), class: "block text-sm font-medium text-primary mb-2" %>

<%= t(".permissions_help") %>

<% [ ["read", t(".scope_read_only"), t(".scope_read_only_description")], ["read_write", t(".scope_read_write"), t(".scope_read_write_description")] ].each do |value, label, description| %>
<% end %>
<%= render DS::Alert.new(title: t(".security_warning_title"), variant: :warning) do %>

<%= t(".security_warning_body") %>

<% end %>
<%= render DS::Link.new( text: t(".cancel"), href: settings_api_key_path, variant: "ghost" ) %> <%= render DS::Button.new( text: t(".save_api_key"), variant: "primary", type: "submit" ) %>
<% end %> <% end %>