@extends('layouts.app')

@section('title', __('labCore::lang.lab_core') . ' — ' . __('labCore::lang.settings'))

@section('content')
<section class="content-header">
    <h1><i class="fas fa-vials"></i> {{ __('labCore::lang.lab_core') }} <small>{{ __('labCore::lang.settings') }}</small></h1>
</section>

<section class="content">
    @include('labCore::partials._nav')

    <div class="row">
        <div class="col-md-6">
            <div class="box box-primary">
                <div class="box-header with-border"><h3 class="box-title">Laboratory Settings</h3></div>
                <form method="POST" action="{{ route('lab.settings.update') }}">
                    @csrf @method('PUT')
                    <div class="box-body">
                        <div class="form-group">
                            <label>Clinic / Laboratory Name</label>
                            <input type="text" name="clinic_name" class="form-control" value="{{ $settings['clinic_name'] ?? '' }}">
                        </div>
                        <div class="form-group">
                            <label>Subtitle</label>
                            <input type="text" name="clinic_subtitle" class="form-control" value="{{ $settings['clinic_subtitle'] ?? '' }}">
                        </div>
                        <div class="row">
                            <div class="col-xs-6 form-group">
                                <label>Phone</label>
                                <input type="text" name="clinic_phone" class="form-control" value="{{ $settings['clinic_phone'] ?? '' }}">
                            </div>
                            <div class="col-xs-6 form-group">
                                <label>Email</label>
                                <input type="text" name="clinic_email" class="form-control" value="{{ $settings['clinic_email'] ?? '' }}">
                            </div>
                        </div>
                        <div class="checkbox">
                            <label>
                                <input type="checkbox" name="vetclinic_sync" value="1" {{ ($settings['vetclinic_sync'] ?? '1') == '1' ? 'checked' : '' }}>
                                Enable VetClinic sync (raise lab orders against pets, show results on the pet profile)
                            </label>
                        </div>
                    </div>
                    <div class="box-footer">
                        <button type="submit" class="btn btn-primary"><i class="fa fa-save"></i> Save Settings</button>
                    </div>
                </form>
            </div>
        </div>
    </div>
</section>
@endsection
