<x-app-layout>
    <x-slot name="header">
        <div>
            <p class="text-sm font-semibold uppercase tracking-wide text-blue-600 dark:text-blue-400">Growth & Marketing</p>
            <h2 class="mt-1 text-2xl font-bold text-slate-950 dark:text-white">Public Profile Settings</h2>
        </div>
    </x-slot>

    <section class="max-w-3xl rounded-lg border border-blue-100 bg-white p-6 shadow-sm dark:border-blue-900/50 dark:bg-slate-900">
        <form method="POST" action="{{ route('admin.public-profile-settings.update') }}" class="space-y-4">
            @csrf
            @method('PATCH')
            @foreach ([
                'public_profiles_enabled' => 'Enable public profiles',
                'allow_profit_visibility' => 'Allow users to show/hide profit',
                'allow_discipline_visibility' => 'Allow users to show/hide discipline score',
                'allow_profile_sharing' => 'Allow public profile sharing',
            ] as $field => $label)
                <label class="flex items-center gap-3 text-sm font-semibold text-slate-700 dark:text-slate-200">
                    <input type="checkbox" name="{{ $field }}" value="1" @checked($settings->{$field}) class="rounded border-gray-300 text-blue-600">
                    {{ $label }}
                </label>
            @endforeach
            <button class="rounded-lg bg-blue-600 px-4 py-2 text-sm font-bold text-white">Save Settings</button>
        </form>
    </section>
</x-app-layout>
