<?php $competitor = $competitor ?? []; ?>
<div class="enterprise-settings-fields enterprise-settings-fields--single">
    <div class="enterprise-field">
        <label class="enterprise-field-label">Name <span class="text-danger">*</span></label>
        <input type="text" name="name" class="form-control" value="<?= esc(old('name', $competitor['name'] ?? '')) ?>" required>
    </div>
    <div class="enterprise-field">
        <label class="enterprise-field-label">Code</label>
        <input type="text" name="code" class="form-control text-uppercase" maxlength="30" value="<?= esc(old('code', $competitor['code'] ?? '')) ?>">
    </div>
    <div class="enterprise-field">
        <label class="enterprise-field-label">Website</label>
        <input type="url" name="website" class="form-control" placeholder="https://" value="<?= esc(old('website', $competitor['website'] ?? '')) ?>">
    </div>
    <div class="enterprise-field">
        <label class="enterprise-field-label">Strengths</label>
        <textarea name="strengths" class="form-control" rows="3"><?= esc(old('strengths', $competitor['strengths'] ?? '')) ?></textarea>
    </div>
    <div class="enterprise-field">
        <label class="enterprise-field-label">Weaknesses</label>
        <textarea name="weaknesses" class="form-control" rows="3"><?= esc(old('weaknesses', $competitor['weaknesses'] ?? '')) ?></textarea>
    </div>
    <div class="enterprise-field">
        <label class="enterprise-field-label">Notes</label>
        <textarea name="notes" class="form-control" rows="3"><?= esc(old('notes', $competitor['notes'] ?? '')) ?></textarea>
    </div>
    <div class="enterprise-field">
        <label class="enterprise-field-label">Status</label>
        <select name="status" class="form-select">
            <?php foreach (['active', 'inactive'] as $s): ?>
                <option value="<?= $s ?>" <?= old('status', $competitor['status'] ?? 'active') === $s ? 'selected' : '' ?>><?= ucfirst($s) ?></option>
            <?php endforeach; ?>
        </select>
    </div>
</div>
