@if(Session::has('success'))
    <div class="alert alert-success alert-dismissible" role="alert">
        <button type="button" class="close" data-dismiss="alert" aria-hidden="true">×</button>
        {{ Session::get('success') }}
    </div>
@elseif(Session::has('error'))
    <div class="alert alert-danger alert-dismissible">
        <button type="button" class="close" data-dismiss="alert" aria-hidden="true">×</button>
        <h4><i class="icon fa fa-ban"></i> {{__('誤差')}}:</h4>
        {!! Session::get('error') !!}
    </div>
@elseif(isset($errorMsg))
    <div class="alert alert-danger alert-dismissible">
        <button type="button" class="close" data-dismiss="alert" aria-hidden="true">×</button>
        <h4><i class="icon fa fa-ban"></i> {{__('誤差')}}:</h4>
        {!! $errorMsg !!}
    </div>
@endif
<div class="card-header">
    @if($isInfo)
        <a href="{{route('jurisdiction_parking_add')}}" class="btn btn-lg btn-success">{{__('登録')}}</a>
        <a href="{{route('jurisdiction_parking_edit',['id'=>$jurisdiction_parking_id])}}"
           class="btn btn-lg btn-danger">{{__('編集')}}</a>
    @else
        <button type="submit" class="btn btn-lg btn-danger register" >{{__('保存')}}</button>
    @endIf
</div>
<div class="card-body">
    <div class="row">
    @if($isInfo || $isEdit)
        <!-- 管轄駐輪場ID -->
            <div class="form-group col-3">
                <label>{{__('validation.attributes.jurisdiction_parking_id')}}</label>
            </div>
            <div class="form-group col-9">
                <div class="input-group">
                    <input type="text" class="form-control form-control-lg"
                           placeholder="{{__('validation.attributes.jurisdiction_parking_id')}}"
                           readonly
                           value="{{$jurisdiction_parking_id}}">
                </div>
            </div>
    @endIf
    <!-- 管轄名 -->
        <div class="form-group col-3">
            <label @if(!$isInfo) class="required" @endif>{{__('validation.attributes.jurisdiction_parking_name')}}</label>
        </div>
        <div class="form-group col-9">
            <div class="input-group">
                <input type="text" class="form-control form-control-lg"
                       placeholder="{{__('validation.attributes.jurisdiction_parking_name')}}"
                       name="jurisdiction_parking_name" @if($isInfo) readonly @endif
                       value="{{$jurisdiction_parking_name}}">
            </div>
        </div>

        <!-- オペレータ （エリアマネージャ） -->
        <div class="form-group col-3">
            <label @if(!$isInfo) class="required" @endif>{{__('validation.attributes.ope_name')}}</label>
        </div>
        <div class="form-group col-9">
            <div class="input-group">
                <select class="form-control form-control-lg" name="ope_name" @if($isInfo) disabled @endif>
                    <option value="">{{__('validation.attributes.ope_name')}}</option>
                    @foreach($listOpes as $key => $item)
                        <option value="{{$key}}" @if($key == $ope_id) selected @endif>{{$item}}</option>
                    @endforeach
                </select>
            </div>
        </div>

        <!--  駐輪場 -->
        <div class="form-group col-3">
            <label @if(!$isInfo) class="required" @endif>{{__('validation.attributes.park_name')}}</label>
        </div>
        <div class="form-group col-9">
            <div class="input-group">
                <select class="form-control form-control-lg" name="park_name" @if($isInfo) disabled @endif>
                    <option value="">{{__('validation.attributes.park_name')}}</option>
                    @foreach($listParks as $key => $item)
                        <option value="{{$key}}" @if($key == $park_id) selected @endif>{{$item}}</option>
                    @endforeach
                </select>
            </div>
        </div>
    </div>
    @if($isInfo)
        <a href="{{route('jurisdiction_parking_add')}}" class="btn btn-lg btn-success">{{__('登録')}}</a>
        <a href="{{route('jurisdiction_parking_edit',['id'=>$jurisdiction_parking_id])}}"
           class="btn btn-lg btn-danger">{{__('編集')}}</a>
    @else
        <button type="submit" class="btn btn-lg btn-danger register" >{{__('保存')}}</button>
    @endIf
</div>

