@extends('employee.layouts.app')
@section('title', 'Buat Statemen | Career Development and Consultation (CDC)')
@section('navigation')
    <h1 class="my-1 d-flex align-items-center text-dark fw-bolder fs-3">Statemen
        <span class="mx-2 border-gray-200 h-20px border-start ms-3"></span>
        <small class="my-1 text-muted fs-7 fw-bold ms-1">Buat Statemen</small>
    </h1>
@endsection
@section('content')
    <div class="card">
        <div class="pt-4 border card-body">
            <form action="{{ route('statements.store') }}" method="POST" class="form" autocomplete="off">
                @csrf
                <div class="pt-4 mb-8 d-flex flex-column fv-row">
                    <label class="mb-2 d-flex align-items-center fs-6 fw-bold">
                        <span class="required">Kode</span>
                        <i class="fas fa-exclamation-circle ms-2 fs-7" data-bs-toggle="tooltip"
                            title="Kode statemen dibuat secara otomatis"></i>
                    </label>
                    <input type="text" class="form-control form-control-solid" name="statement_code"
                        value="{{ $generateStatementCode }}" readonly />
                    @error('statement_code')
                        <div class="fv-plugins-message-container invalid-feedback">
                            <span>{{ $message }}</span>
                        </div>
                    @enderror
                </div>
                <div class="pt-4 mb-8 d-flex flex-column fv-row">
                    <label class="mb-2 d-flex align-items-center fs-6 fw-bold">
                        <span class="required">Statemen</span>
                        <i class="fas fa-exclamation-circle ms-2 fs-7" data-bs-toggle="tooltip"
                            title="Statemen/pernyataan"></i>
                    </label>
                    <input type="text" class="form-control form-control-solid" placeholder="Contoh: Saya suka matematika"
                        name="statement" value="{{ old('statement') }}" />
                    @error('statement')
                        <div class="fv-plugins-message-container invalid-feedback">
                            <span>{{ $message }}</span>
                        </div>
                    @enderror
                </div>
                <div class="mb-8 d-flex flex-column">
                    <label class="mb-2 d-flex align-items-center fs-6 fw-bold">
                        <span>Deskripsi Statemen</span>
                        <i class="fas fa-exclamation-circle ms-2 fs-7" data-bs-toggle="tooltip"
                            title="Deskripsi Statemen (Opsional)"></i>
                    </label>
                    <textarea class="form-control form-control-solid" rows="6" name="desc" placeholder="Opsional">{{ old('desc') }}</textarea>
                    @error('desc')
                        <div class="fv-plugins-message-container invalid-feedback">
                            <span>{{ $message }}</span>
                        </div>
                    @enderror
                </div>
                <div class="d-flex justify-content-end">
                    <a href="{{ route('statements') }}" class="btn btn-light btn-active-light-primary me-2">Kembali</a>
                    <button type="submit" class="btn btn-primary">Simpan</button>
                </div>
            </form>
        </div>
    </div>
@endsection
@push('scripts')
    <script src="{{ asset('assets/employee/plugins/custom/ckeditor/ckeditor-classic.bundle.js') }}"></script>
@endpush
