<form action="{{ $processStep ? route('admin.process-steps.update', $processStep) : route('admin.process-steps.store') }}" method="POST">
    @csrf
    @if($processStep) @method('PUT') @endif
    <div class="mb-3">
        <label class="form-label">Step Number <span class="text-danger">*</span></label>
        <input type="text" name="step_number" class="form-control" value="{{ old('step_number', $processStep->step_number ?? '') }}" placeholder="e.g. 01" required>
    </div>
    <div class="mb-3">
        <label class="form-label">Title <span class="text-danger">*</span></label>
        <input type="text" name="title" class="form-control" value="{{ old('title', $processStep->title ?? '') }}" placeholder="e.g. Plan" required>
    </div>
    <div class="mb-3">
        <label class="form-label">Description</label>
        <textarea name="description" class="form-control" rows="3">{{ old('description', $processStep->description ?? '') }}</textarea>
    </div>
    <div class="mb-3">
        <label class="form-label">Bootstrap Icon</label>
        <input type="text" name="icon" class="form-control" value="{{ old('icon', $processStep->icon ?? '') }}" placeholder="e.g. bi-clipboard-check">
    </div>
    <div class="mb-3">
        <label class="form-label">Sort Order</label>
        <input type="number" name="sort_order" class="form-control" value="{{ old('sort_order', $processStep->sort_order ?? 0) }}" min="0">
    </div>
    <div class="form-check mb-3">
        <input type="checkbox" class="form-check-input" id="is_active" name="is_active" value="1" {{ old('is_active', $processStep->is_active ?? true) ? 'checked' : '' }}>
        <label class="form-check-label" for="is_active">Active</label>
    </div>
    <button type="submit" class="btn btn-primary">{{ $processStep ? 'Update' : 'Create' }} Step</button>
    <a href="{{ route('admin.process-steps.index') }}" class="btn btn-outline-secondary">Cancel</a>
</form>
