<div class="card-header">
    <h4>Settings</h4>
</div>
<div class="card-body">
    <form action="{{ route('settings.store') }}" method="POST" enctype="multipart/form-data">
        @csrf
        <div class="row">
            <div class="col-6">
                <div class="form-group">
                    <label>Notification Message</label>
                    <input name="notification" type="text"
                        value="{{ old('notification', $settings->where('key', 'notification')->first()->value ?? '') }}"
                        class="form-control">
                    <x-input-error field="notification" />
                </div>
            </div>
            <div class="col-6">
                <div class="form-group">
                    <label>Winning Multiplier</label>
                    <input name="winning_multiplier" type="number"
                        value="{{ old('winning_multiplier', $settings->where('key', 'winning_multiplier')->first()->value ?? '') }}"
                        class="form-control" step="0.1">
                    <x-input-error field="winning_multiplier" />
                </div>
            </div>
            <div class="col-6">
                <div class="form-group">
                    <label>Game Time (mins)</label>
                    <input name="game_time" type="number"
                        value="{{ old('game_time', $settings->where('key', 'game_time')->first()->value ?? '') }}"
                        class="form-control">
                    <x-input-error field="game_time" />
                </div>
            </div>
            <div class="col-6">
                <div class="form-group">
                    <label>Commission Percentage</label>
                    <input name="commission" type="number"
                        value="{{ old('commission', $settings->where('key', 'commission')->first()->value ?? '') }}"
                        class="form-control" step="0.1">
                    <x-input-error field="commission" />
                </div>
            </div>
            <div class="col-6">
                <div class="form-group">
                    <label>Support Link</label>
                    <input name="support_link" type="url"
                        value="{{ old('support_link', $settings->where('key', 'support_link')->first()->value ?? '') }}"
                        class="form-control">
                    <x-input-error field="support_link" />
                </div>
            </div>
        </div>
        <button type="submit" class="btn btn-primary">Save</button>
    </form>
</div>
