<flux:main>
    @include('components.setting-tabs')

    <div class="flex flex-col gap-4 mt-4">
        <div class="grid grid-cols-1 gap-4 lg:grid-cols-2 items-start">
            <div class="col-span-1 lg:col-span-2">
                <flux:card class="space-y-6 p-6">
                    <div class="grid grid-cols-1 md:grid-cols-3 gap-6">
                        <flux:field>
                            <flux:label>Kata Sandi Saat Ini <span class="text-red-500 ms-1">*</span></flux:label>
                            <flux:input placeholder="********" type="password"
                                wire:model.live.debounce.500ms="form.current_password" viewable />
                            <flux:error name="form.current_password" />
                        </flux:field>

                        <flux:field>
                            <flux:label>Kata Sandi Baru <span class="text-red-500 ms-1">*</span></flux:label>
                            <flux:input placeholder="********" type="password"
                                wire:model.live.debounce.500ms="form.new_password" viewable />
                            <flux:error name="form.new_password" />
                        </flux:field>

                        <flux:field>
                            <flux:label>Konfirmasi Kata Sandi <span class="text-red-500 ms-1">*</span></flux:label>
                            <flux:input placeholder="********" type="password"
                                wire:model.live.debounce.500ms="form.new_confirm_password" viewable />
                            <flux:error name="form.new_confirm_password" />
                        </flux:field>
                    </div>
                </flux:card>
            </div>
        </div>
    </div>

    @can('update password')
        <div class="flex justify-start mt-4">
            <flux:button variant="primary" class="sm:w-auto cursor-pointer" wire:click="update">
                Simpan
            </flux:button>
        </div>
    @endcan
</flux:main>
