<x-admin-app-layout>
    <div class="white-box">
        <x-admin::page-header title="{{ __('AI Integrations') }}" :dateFilter="false" :buttons="$buttons" />

        <x-admin::table :columns="$columns" :data="$providers" :is_pagination="false" />

        <x-admin::modal modalId="ai_edit_modal_id" title="{{ __('Edit AI Provider Settings') }}">
            <form class="form-submit-edit" method="POST">
                @csrf
                @method('PUT')
                <div class="grid grid-cols-1 md:grid-cols-2 gap-4">
                    <x-admin::text-input-group name="api_url" label="API URL" />
                    <x-admin::text-input-group name="api_key" label="API Key" />
                    <x-admin::text-input-group type="number" name="timeout" label="Timeout (in minutes)" />
                    <x-admin::text-input-group name="model" label="Model" />
                </div>
                <div class="flex items-center justify-end mt-4">
                    <x-admin::primary-button>
                        {{ __('Save') }}
                    </x-admin::primary-button>
                </div>
            </form>
        </x-admin::modal>
    </div>
</x-admin-app-layout>
