 <%= f.fields_for :value do |ff| %>
  <%= ff.hidden_field :service, value: 'google' %>
  <%= ff.fields_for :configs, configs do |fff| %>
    <div class="grid md:grid-cols-2 gap-4">
      <div class="form-control">
        <%= fff.label :project, 'Project', class: 'label' %>
        <%= fff.text_field :project, value: configs['project'], required: true, class: 'base-input' %>
      </div>
      <div class="form-control">
        <%= fff.label :bucket, class: 'label' %>
        <%= fff.text_field :bucket, value: value['service'] == 'google' ? configs['bucket'] : '', required: true, class: 'base-input' %>
      </div>
    </div>
    <div class="form-control">
      <%= fff.label :credentials, 'Credentials (JSON key content)', class: 'label' %>
      <%= fff.text_area :credentials, required: true, class: 'base-textarea w-full font-mono', rows: 4, placeholder: configs['credentials'].present? ? "{\n**REDACTED**\n}" : '' %>
    </div>
  <% end %>
<% end %>
