@extends('layouts.app')
@section('title', '駐輪規定 新規登録')

@section('content')
    <div class="content-header">
        <div class="container-fluid">
            <div class="row mb-2">
                <div class="col-lg-6">
                    <h1 class="m-0 text-dark">新規</h1>
                </div>
                <div class="col-lg-6">
                    <ol class="breadcrumb float-sm-right text-sm">
                        <li class="breadcrumb-item"><a href="{{ route('home') }}">ホーム</a></li>
                            <li class="breadcrumb-item"><a href="{{ route('parking_regulations_list', ['park_id' => $parkId]) }}">駐輪規定マスタ</a></li>
                        <li class="breadcrumb-item active">新規登録</li>
                    </ol>
                </div>
            </div>
        </div>
    </div>

    <section class="content">
        <div class="container-fluid">
            @if ($errors->any())
                <div class="alert alert-danger">@foreach($errors->all() as $e) <div>{{ $e }}</div> @endforeach</div>
            @endif

            <div class="card">
                <div class="card-body">
                    <form method="POST" action="{{ route('parking_regulations_add') }}">
                        @csrf
                        @include('admin.parking_regulations._form', ['psections' => $psections, 'ptypes' => $ptypes, 'parkId' => $parkId, 'record' => null])

                        <div class="text-end">
                            <button type="button" class="btn btn-primary register">登録</button>
                            <a href="{{ route('parking_regulations_list', ['park_id' => $parkId]) }}" class="btn btn-default">戻る</a>
                        </div>
                    </form>
                </div>
            </div>
        </div>
    </section>
@endsection
