<?php 
$pageTitle = 'Add New Property';
include __DIR__ . '/../layouts/header.php'; 
?>

<div class="d-flex justify-content-between align-items-center mb-4">
    <h2><i class="bi bi-house-add me-2"></i>Add New Property</h2>
    <a href="<?= $this->baseUrl('/rent/properties') ?>" class="btn btn-outline-secondary">
        <i class="bi bi-arrow-left"></i> Back to Properties
    </a>
</div>

<div class="card">
    <div class="card-body">
        <form method="post" action="<?= $this->baseUrl('/rent/properties') ?>">
            <div class="row">
                <div class="col-md-6">
                    <div class="mb-3">
                        <label class="form-label">Property Name <span class="text-danger">*</span></label>
                        <input type="text" name="name" class="form-control" required autofocus>
                    </div>
                    <div class="mb-3">
                        <label class="form-label">Address</label>
                        <textarea name="address" class="form-control" rows="3"></textarea>
                    </div>
                    <div class="mb-3">
                        <label class="form-label">Monthly Rent (KES)</label>
                        <input type="number" step="0.01" name="monthly_rent" class="form-control">
                    </div>
                </div>
                <div class="col-md-6">
                    <div class="mb-3">
                        <label class="form-label">Tenant Name</label>
                        <input type="text" name="tenant_name" class="form-control">
                    </div>
                    <div class="mb-3">
                        <label class="form-label">Tenant Phone</label>
                        <input type="text" name="tenant_phone" class="form-control" placeholder="e.g., 0712345678">
                    </div>
                    <div class="mb-3">
                        <label class="form-label">Status</label>
                        <select name="status" class="form-select">
                            <option value="vacant">Vacant</option>
                            <option value="occupied">Occupied</option>
                        </select>
                    </div>
                </div>
            </div>
            <hr>
            <div class="d-flex gap-2">
                <button type="submit" class="btn btn-primary">
                    <i class="bi bi-save"></i> Save Property
                </button>
                <a href="<?= $this->baseUrl('/rent/properties') ?>" class="btn btn-outline-secondary">
                    <i class="bi bi-x-circle"></i> Cancel
                </a>
            </div>
        </form>
    </div>
</div>

<?php include __DIR__ . '/../layouts/footer.php'; ?>