<div class="modal fade sc-coa-quick-modal" id="scCoaQuickAddModal" tabindex="-1" data-bs-backdrop="static">
    <div class="modal-dialog modal-dialog-centered">
        <div class="modal-content">
            <div class="modal-header border-0 py-2 px-3">
                <h5 class="modal-title fw-semibold mb-0" style="font-size:1rem">Add Chart of Accounts Ledger</h5>
                <button type="button" class="btn-close" data-bs-dismiss="modal"></button>
            </div>
            <form id="scCoaQuickAddForm">
                <div class="modal-body">
                    <div class="alert alert-danger d-none py-2 px-3 mb-2" id="scCoaQuickAddError" style="font-size:13px"></div>
                    <div class="sc-coa-quick-fields">
                        <div>
                            <label class="form-label fw-semibold">Account Name <span class="text-danger">*</span></label>
                            <input type="text" name="name" class="form-control sc-coa-name" required maxlength="150" placeholder="e.g. Salary Payable">
                        </div>
                        <div>
                            <label class="form-label fw-semibold">Code</label>
                            <input type="text" name="code" class="form-control sc-coa-code" maxlength="30" placeholder="Optional">
                        </div>
                        <div>
                            <label class="form-label fw-semibold">Account Type <span class="text-danger">*</span></label>
                            <select name="account_section" class="form-select sc-coa-section" required></select>
                        </div>
                    </div>

                    <div class="sc-coa-quick-parent-wrap">
                        <label class="form-label fw-semibold">Parent Account</label>
                        @include('accounting.coa._parent-picker', [
                            'pickerId' => 'scCoaQuickParentPicker',
                            'inputName' => 'parent_id',
                            'allowAddNew' => true,
                            'compact' => true,
                        ])
                        <div class="coa-parent-inline-add" id="scCoaParentInlineAdd">
                            <div class="row g-2 align-items-end">
                                <div class="col-sm-5">
                                    <label class="form-label fw-semibold mb-1" style="font-size:12px">Parent Name <span class="text-danger">*</span></label>
                                    <input type="text" class="form-control form-control-sm sc-coa-parent-name" maxlength="150" placeholder="Parent account name">
                                </div>
                                <div class="col-sm-3">
                                    <label class="form-label fw-semibold mb-1" style="font-size:12px">Code</label>
                                    <input type="text" class="form-control form-control-sm sc-coa-parent-code" maxlength="30" placeholder="Optional">
                                </div>
                                <div class="col-sm-4 d-flex gap-2">
                                    <button type="button" class="btn btn-primary btn-sm sc-coa-parent-create">Create Parent</button>
                                    <button type="button" class="btn btn-outline-secondary btn-sm sc-coa-parent-cancel">Cancel</button>
                                </div>
                            </div>
                            <div class="text-danger mt-1 d-none sc-coa-parent-error" style="font-size:12px"></div>
                        </div>
                    </div>
                </div>
                <div class="modal-footer border-0 py-2 px-3">
                    <button type="button" class="btn btn-outline-secondary btn-sm" data-bs-dismiss="modal">Cancel</button>
                    <button type="button" class="btn btn-outline-primary btn-sm sc-coa-save-new">Save &amp; New</button>
                    <button type="submit" class="btn btn-primary btn-sm" id="scCoaQuickAddSubmit">
                        <i class="bi bi-check-lg me-1"></i>Save
                    </button>
                </div>
            </form>
        </div>
    </div>
</div>
