@extends('admin.layouts.app')
@section('title', 'Print Settings')
@section('content')
<div class="card">
    <div class="card-head"><h3 style="margin:0;">Print Settings</h3></div>
    <form method="POST" action="{{ route('admin.settings.printer.save') }}">
        @csrf
        <div class="grid cols-2">
            <div>
                <label>Paper Size</label>
                <select class="input" name="paper_size">
                    @foreach(['A4', '80mm Thermal', '58mm Thermal'] as $paper)
                    <option value="{{ $paper }}" @selected(old('paper_size', $settings['paper_size']) === $paper)>{{ $paper }}</option>
                    @endforeach
                </select>
            </div>
            <div>
                <label>Print Type</label>
                <select class="input" name="print_type">
                    @foreach(['Invoice', 'POS Receipt', 'Barcode Label'] as $type)
                    <option value="{{ $type }}" @selected(old('print_type', $settings['print_type']) === $type)>{{ $type }}</option>
                    @endforeach
                </select>
            </div>
            <div>
                <label>Show Logo</label>
                <select class="input" name="show_logo"><option value="Yes" @selected(old('show_logo', $settings['show_logo']) === 'Yes')>Yes</option><option value="No" @selected(old('show_logo', $settings['show_logo']) === 'No')>No</option></select>
            </div>
            <div>
                <label>Show Address</label>
                <select class="input" name="show_address"><option value="Yes" @selected(old('show_address', $settings['show_address']) === 'Yes')>Yes</option><option value="No" @selected(old('show_address', $settings['show_address']) === 'No')>No</option></select>
            </div>
            <div>
                <label>Show Signature</label>
                <select class="input" name="show_signature"><option value="Yes" @selected(old('show_signature', $settings['show_signature']) === 'Yes')>Yes</option><option value="No" @selected(old('show_signature', $settings['show_signature']) === 'No')>No</option></select>
            </div>
        </div>
        <div style="margin-top:14px;"><button class="btn btn-primary">Save Settings</button></div>
    </form>
</div>
@endsection
