@php use App\Models\Client;use Carbon\Carbon; @endphp
@extends('adminlte::page')

@section('title', 'IPRS | Service Form')

@section('content_header')
    <h3>Register a New Service</h3>
@stop

@section('content')
    <div class="card">
        <div class="card-body">
            <div class="d-flex justify-content-start align-content-start mb-4 mt-1">
                <a href="{{ route('service.index') }}" class="btn btn-primary">Go Back to Service List</a>
            </div>
            <form method="POST" action="{{ route('service.store') }}@yield('id')">
                @csrf
                @section('method')@show
                <fieldset>
                    <legend>Service</legend>
                    <div class="row">
                        <x-adminlte-input name="service_name" label="Service Name" placeholder="Service Name"
                                          value=""
                                          fgroup-class="col-md-3"/>

                        <x-adminlte-select name="service_group_id" label="Select a Service Group" placeholder="Select a Service Group"
                                           fgroup-class="col-md-3">

                            <option value="">Select a Service Group</option>
                            @foreach($service_groups as $service_group)
                                <option value="{{ $service_group->id }}">{{ $service_group->service_name }}</option>
                            @endforeach

                        </x-adminlte-select>

                    </div>
                </fieldset>
                <button type="submit" class="btn btn-primary">Submit</button>
            </form>
        </div>
    </div>


@stop

@section('css')
    <style>
        fieldset {
            background-color: #eeeeee;
            padding-block-start: 0.35em;
            padding-inline-start: 1.25em;
            padding-inline-end: 1.25em;
            padding-block-end: 0.625em;
            margin: 0 0 1em 0;
            border: 1px groove rgb(192, 192, 192);
            border-radius: 5px;
        }

        legend {
            background-color: gray;
            color: white;
            width: auto;
            font-size: medium;
            padding: 5px 10px;
            border-radius: 5px;
        }

        .row{
            justify-content: space-around;
        }

        .column{
            justify-content: space-around;
        }

        .access{
            margin-left: 10px;
        }
    </style>
@stop
