<% if @api_key_present %>
<%= t("reports.google_sheets_instructions.ready") %>
<%= t("reports.google_sheets_instructions.steps") %>
=IMPORTDATA("<%= @csv_url %>")
<%= icon("alert-triangle", class: "w-4 h-4 inline") %> <%= t("reports.google_sheets_instructions.security_warning") %>
<% else %>
<%= t("reports.google_sheets_instructions.need_key") %>
- <%= t("reports.google_sheets_instructions.step1") %>
- <%= t("reports.google_sheets_instructions.step2") %>
- <%= t("reports.google_sheets_instructions.step3") %>
- <%= t("reports.google_sheets_instructions.step4") %>
<%= t("reports.google_sheets_instructions.example") %>:
<%= @csv_url %>&api_key=YOUR_API_KEY_HERE
<%= t("reports.google_sheets_instructions.then_use") %>
<% end %>
<% if @api_key_present %>
<%= render DS::Button.new(
text: t("reports.google_sheets_instructions.open_sheets"),
variant: "primary",
full_width: true,
href: "https://sheets.google.com/create",
target: "_blank",
data: { action: "click->DS--dialog#close" }
) %>
<% else %>
<%= render DS::Button.new(
text: t("reports.google_sheets_instructions.go_to_api_keys"),
variant: "primary",
full_width: true,
href: settings_api_key_path,
frame: "_top"
) %>
<% end %>
<%= render DS::Button.new(
text: t("reports.google_sheets_instructions.close"),
variant: "outline",
full_width: true,
data: { action: "DS--dialog#close" }
) %>