@extends('backend.master')
@section('title', 'Add Bank Method')

@section('content')
<h1 class="h4 mb-3">নতুন Bank Method</h1>

@if ($errors->any())
    <div class="alert alert-danger">
        <ul class="mb-0">
            @foreach ($errors->all() as $error)
                <li>{{ $error }}</li>
            @endforeach
        </ul>
    </div>
@endif

<form action="{{ route('admin.deposit-methods.bank.store') }}" method="POST" enctype="multipart/form-data">
    @csrf

    <div class="mb-3">
        <label class="form-label">Bank Name</label>
        <input type="text" name="bank_name" value="{{ old('bank_name') }}" class="form-control" required>
    </div>

    <div class="mb-3">
        <label class="form-label">Slug</label>
        <input type="text" name="slug" value="{{ old('slug') }}" class="form-control" required>
        <small class="text-muted">উদাহরণ: ab-bank, dbbl ইত্যাদি</small>
    </div>

    <div class="mb-3">
        <label class="form-label">Logo (image)</label>
        <input type="file" name="logo" class="form-control">
    </div>

    <div class="mb-3">
        <label class="form-label">Account Number</label>
        <input type="text" name="account_number" value="{{ old('account_number') }}" class="form-control" required>
    </div>

    <div class="mb-3">
        <label class="form-label">Account Holder</label>
        <input type="text" name="account_holder" value="{{ old('account_holder') }}" class="form-control" required>
    </div>

    <div class="mb-3">
        <label class="form-label">Branch Name</label>
        <input type="text" name="branch_name" value="{{ old('branch_name') }}" class="form-control">
    </div>

    <div class="mb-3 row">
        <div class="col-md-4">
            <label class="form-label">Sort Order</label>
            <input type="number" name="sort_order" value="{{ old('sort_order', 0) }}" class="form-control">
        </div>
        <div class="col-md-4 d-flex align-items-end">
            <div class="form-check">
                <input type="checkbox" name="status" value="1" class="form-check-input" id="status" checked>
                <label for="status" class="form-check-label">Active</label>
            </div>
        </div>
    </div>

    <button class="btn btn-primary">Save</button>
    <a href="{{ route('admin.deposit-methods.bank.index') }}" class="btn btn-secondary">Back</a>
</form>
@endsection
