<x-admin-layout>
    <x-slot name="header">
        <h2 class="font-bold text-2xl text-gray-900 dark:text-white leading-tight">
            {{ __('Pengaturan Toko') }}
        </h2>
    </x-slot>

    <div class="w-full">
        <div class="bg-white dark:bg-slate-800 rounded-2xl shadow-sm border border-gray-100 dark:border-slate-700 overflow-hidden">
            <form action="{{ route('admin.settings.store') }}" method="POST">
                @csrf
                <div class="p-8 space-y-6">
                    <div>
                        <label for="store_name" class="block text-sm font-medium text-gray-700 dark:text-gray-200 mb-2">Nama Toko</label>
                        <input type="text" name="store_name" id="store_name" value="{{ old('store_name', $settings['store_name'] ?? 'DigiShop') }}"
                            class="block w-full rounded-lg border-gray-300 dark:border-slate-600 shadow-sm focus:border-indigo-500 focus:ring-indigo-500 py-2.5 px-3 border dark:bg-slate-700 dark:text-white dark:border-slate-600">
                    </div>

                    <div>
                        <label for="whatsapp_number" class="block text-sm font-medium text-gray-700 dark:text-gray-200 mb-2">Nomor WhatsApp Admin (Untuk Order)</label>
                        <div class="relative rounded-md shadow-sm">
                            <div class="absolute inset-y-0 left-0 pl-3 flex items-center pointer-events-none">
                                <span class="text-gray-500 dark:text-gray-400 sm:text-sm">wa.me/</span>
                            </div>
                            <input type="text" name="whatsapp_number" id="whatsapp_number" value="{{ old('whatsapp_number', $settings['whatsapp_number'] ?? '') }}"
                                class="block w-full pl-16 rounded-lg border-gray-300 dark:border-slate-600 shadow-sm focus:border-indigo-500 focus:ring-indigo-500 py-2.5 px-3 border dark:bg-slate-700 dark:text-white dark:border-slate-600"
                                placeholder="62812xxxxxx">
                        </div>
                        <p class="mt-2 text-xs text-gray-500 dark:text-gray-400">Awali dengan kode negara (misal: 62) tanpa tanda plus (+).</p>
                    </div>

                    <div>
                        <label for="store_description" class="block text-sm font-medium text-gray-700 dark:text-gray-200 mb-2">Deskripsi Singkat Toko</label>
                        <textarea id="store_description" name="store_description" rows="4" 
                            class="block w-full rounded-lg border-gray-300 dark:border-slate-600 shadow-sm focus:border-indigo-500 focus:ring-indigo-500 py-2.5 px-3 border">{{ old('store_description', $settings['store_description'] ?? '') }}</textarea>
                    </div>
                </div>

                <div class="px-8 py-4 bg-gray-50 dark:bg-slate-700/50 border-t border-gray-100 dark:border-slate-700 flex items-center justify-end">
                    <button type="submit" class="inline-flex items-center justify-center px-6 py-2.5 text-sm font-medium text-white bg-indigo-600 border border-transparent rounded-lg shadow-sm hover:bg-indigo-700 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-indigo-500">
                        <x-heroicon-s-check class="w-5 h-5 mr-2" /> Simpan Pengaturan
                    </button>
                </div>
            </form>
        </div>
    </div>
</x-admin-layout>
