@csrf
<div class="row g-3">
    <div class="col-md-6">
        <label class="form-label">Jumuiya / Cell Name</label>
        <input type="text" name="name" value="{{ old('name', $jumuiya->name) }}" class="form-control" required>
    </div>
    <div class="col-md-6">
        <label class="form-label">Cell Code</label>
        <input type="text" name="code" value="{{ old('code', $jumuiya->code) }}" class="form-control" required>
    </div>
    <div class="col-md-6">
        <label class="form-label">Leader Name</label>
        <input type="text" name="leader_name" value="{{ old('leader_name', $jumuiya->leader_name) }}" class="form-control">
    </div>
    <div class="col-md-6">
        <label class="form-label">Assistant Leader</label>
        <input type="text" name="assistant_leader" value="{{ old('assistant_leader', $jumuiya->assistant_leader) }}" class="form-control">
    </div>
    <div class="col-md-4">
        <label class="form-label">Phone Number</label>
        <div class="input-icon">
            <i data-lucide="phone"></i>
            <input type="text" name="phone" value="{{ old('phone', $jumuiya->phone) }}" class="form-control" data-phone-input placeholder="+255 700 000 000">
        </div>
    </div>
    <div class="col-md-4">
        <label class="form-label">Location / Area</label>
        <input type="text" name="location" value="{{ old('location', $jumuiya->location) }}" class="form-control">
    </div>
    <div class="col-md-4">
        <label class="form-label">Status</label>
        <select name="status" class="form-select" required>
            @foreach (['active' => 'Active', 'inactive' => 'Inactive'] as $value => $label)
                <option value="{{ $value }}" @selected(old('status', $jumuiya->status ?: 'active') === $value)>{{ $label }}</option>
            @endforeach
        </select>
    </div>
    <div class="col-12">
        <label class="form-label">Description</label>
        <textarea name="description" rows="3" class="form-control">{{ old('description', $jumuiya->description) }}</textarea>
    </div>
</div>
<div class="{{ ($modal ?? false) ? 'modal-footer px-0 pb-0' : 'mt-4 d-flex gap-2' }}">
    @if ($modal ?? false)
        <button type="button" class="btn btn-outline-secondary" data-bs-dismiss="modal"><i data-lucide="x"></i><span>Cancel</span></button>
    @else
        <a href="{{ route('jumuiyas.index') }}" class="btn btn-outline-secondary"><i data-lucide="x"></i><span>Cancel</span></a>
    @endif
    <button class="btn btn-primary"><i data-lucide="save"></i><span>Save Jumuiya</span></button>
</div>
