@extends('layouts.app')

@section('content')

    <div class="px-3">

        <form class="row" action="{{ route('responsible.update', $responsible) }}" method="post">
            <div class="col-xxl-6">
                <h4>Ответственный</h4>
                @csrf

                @include('partials.select', ['name' => 'area_id', 'title' => 'Район', 'options' => $areas, 'value' => $responsible->area?->id])
                @include('partials.input', ['name' => 'name', 'title' => 'ФИО', 'required' => true, 'value' => $responsible->name])
                @include('partials.input', ['name' => 'phone', 'title' => 'Телефон', 'required' => true, 'value' => $responsible->phone])

                @include('partials.submit', ['name' => 'Сохранить', 'delete' => ['form_id' => 'destroy', 'title' => 'Удалить']])
            </div>
        </form>
    </div>
    <div class="visually-hidden d-none">
        <form action="{{ route('responsible.destroy', $responsible) }}" id="destroy" method="post">
            @csrf
            @method('DELETE')
        </form>
    </div>
@endsection
