{{-- resources/views/admin/parks/_form.blade.php --}}
{{-- 駐輪場マスタ 共通フォーム（add/edit 共用） --}}

@php
    $p = $park ?? null;
@endphp

<style>
    /* 让布局和目标图更接近 */
    .form-section .col-form-label{ font-weight:600 }
    .req:after{ content:" *"; color:#dc3545; }
    .unit-after{ display:flex; align-items:center; gap:.5rem }
    .unit-after span{ white-space:nowrap }
</style>

<div class="form-section">

    {{-- 駐輪場ID（編集のみ） --}}
    @if(!empty($p?->park_id))
    <div class="form-group row">
        <label class="col-md-2 col-form-label">駐輪場ID</label>
        <div class="col-md-4">
            <input type="text" class="form-control" name="park_id"
                   value="{{ old('park_id',$p->park_id) }}" readonly>
        </div>
    </div>
    @endif

    {{-- 市区 --}}
    <div class="form-group row">
        <label class="col-md-2 col-form-label req">市区</label>
        <div class="col-md-4">
            <select class="form-control" name="city_id" required>
                <option value="">都市を選択</option>
                @foreach($cities as $city)
                    <option value="{{ $city->city_id }}"
                        @selected(old('city_id',$p->city_id ?? '') == $city->city_id)>
                        {{ $city->city_name }}
                    </option>
                @endforeach
            </select>
        </div>
    </div>

    {{-- 駐輪場名 --}}
    <div class="form-group row">
        <label class="col-md-2 col-form-label req">駐輪場名</label>
        <div class="col-md-6">
            <input type="text" class="form-control" name="park_name"
                   value="{{ old('park_name',$p->park_name ?? '') }}" required>
        </div>
    </div>

    {{-- 駐輪場ふりがな / 駐輪場五十音 --}}
    <div class="form-group row">
        <label class="col-md-2 col-form-label">駐輪場ふりがな</label>
        <div class="col-md-6">
            <input type="text" class="form-control" name="park_ruby"
                   value="{{ old('park_ruby',$p->park_ruby ?? '') }}">
        </div>
    </div>
    <div class="form-group row">
        <label class="col-md-2 col-form-label">駐輪場五十音</label>
        <div class="col-md-3">
            <input type="text" class="form-control" name="park_syllabary"
                   value="{{ old('park_syllabary',$p->park_syllabary ?? '') }}">
        </div>
    </div>

    {{-- 住所 --}}
    <div class="form-group row">
        <label class="col-md-2 col-form-label">住所</label>
        <div class="col-md-8">
            <input type="text" class="form-control" name="park_adrs"
                   value="{{ old('park_adrs',$p->park_adrs ?? '') }}">
        </div>
    </div>

    {{-- 閉設フラグ / 閉設日 --}}
    <div class="form-group row">
        <label class="col-md-2 col-form-label">閉設フラグ</label>
        <div class="col-md-6 d-flex align-items-center">
            @foreach([0=>'開設',1=>'閉設',2=>'準備中'] as $v=>$label)
                <div class="form-check form-check-inline">
                    <input class="form-check-input" type="radio" name="park_close_flag" id="close_{{$v}}"
                           value="{{$v}}" @checked(old('park_close_flag',$p->park_close_flag ?? 0)==$v)>
                    <label class="form-check-label" for="close_{{$v}}">{{ $label }}</label>
                </div>
            @endforeach
        </div>
    </div>
    <div class="form-group row">
        <label class="col-md-2 col-form-label">閉設日</label>
        <div class="col-md-3">
            <input type="date" class="form-control" name="park_day"
                   value="{{ old('park_day',$p->park_day ?? '') }}">
        </div>
    </div>

    {{-- 価格メモ --}}
    <div class="form-group row">
        <label class="col-md-2 col-form-label">価格メモ</label>
        <div class="col-md-8">
            <textarea class="form-control" name="price_memo" rows="2">{{ old('price_memo',$p->price_memo ?? '') }}</textarea>
        </div>
    </div>

    {{-- 逆利用（一般） / 逆利用フラグ（学生） / 駐輪規定フラグ --}}
    <div class="form-group row">
        <label class="col-md-2 col-form-label">逆利用（一般）</label>
        <div class="col-md-6">
            @foreach([1=>'逆利用OK',0=>'逆利用NG'] as $v=>$label)
                <div class="form-check form-check-inline">
                    <input class="form-check-input" type="radio" name="reverse_use_general" id="rug{{$v}}"
                           value="{{$v}}" @checked(old('reverse_use_general',$p->reverse_use_general ?? 1)==$v)>
                    <label class="form-check-label" for="rug{{$v}}">{{ $label }}</label>
                </div>
            @endforeach
        </div>
    </div>
    <div class="form-group row">
        <label class="col-md-2 col-form-label">逆利用フラグ（学生）</label>
        <div class="col-md-6">
            @foreach([1=>'逆利用OK',0=>'逆利用NG'] as $v=>$label)
                <div class="form-check form-check-inline">
                    <input class="form-check-input" type="radio" name="reverse_use_student" id="rus{{$v}}"
                           value="{{$v}}" @checked(old('reverse_use_student',$p->reverse_use_student ?? 1)==$v)>
                    <label class="form-check-label" for="rus{{$v}}">{{ $label }}</label>
                </div>
            @endforeach
        </div>
    </div>
    <div class="form-group row">
        <label class="col-md-2 col-form-label">駐輪規定フラグ</label>
        <div class="col-md-6">
            @foreach([1=>'使用する',0=>'使用しない'] as $v=>$label)
                <div class="form-check form-check-inline">
                    <input class="form-check-input" type="radio" name="parking_rule_flag" id="prf{{$v}}"
                           value="{{$v}}" @checked(old('parking_rule_flag',$p->parking_rule_flag ?? 1)==$v)>
                    <label class="form-check-label" for="prf{{$v}}">{{ $label }}</label>
                </div>
            @endforeach
        </div>
    </div>

    {{-- 残警告チェックフラグ / 印字数 / 最新キープアライブ --}}
    <div class="form-group row">
        <label class="col-md-2 col-form-label">残警告チェックフラグ</label>
        <div class="col-md-2">
            <input type="number" class="form-control" name="alert_flag"
                   value="{{ old('alert_flag',$p->alert_flag ?? 0) }}">
        </div>
    </div>
    <div class="form-group row">
        <label class="col-md-2 col-form-label">印字数</label>
        <div class="col-md-2">
            <input type="number" class="form-control" name="print_number"
                   value="{{ old('print_number',$p->print_number ?? 0) }}">
        </div>
    </div>
    <div class="form-group row">
        <label class="col-md-2 col-form-label">最新キープアライブ</label>
        <div class="col-md-3">
            <input type="datetime-local" class="form-control" name="keep_alive"
                   value="{{ old('keep_alive', !empty($p?->keep_alive) ? date('Y-m-d\TH:i',strtotime($p->keep_alive)) : '') }}">
        </div>
    </div>

    {{-- 更新期間開始/終了（日期+時分） --}}
    <div class="form-group row">
        <label class="col-md-2 col-form-label">更新期間開始日</label>
        <div class="col-md-3">
            <input type="date" class="form-control" name="update_from_date"
                   value="{{ old('update_from_date',$p->update_from_date ?? '') }}">
        </div>
    </div>
    <div class="form-group row">
        <label class="col-md-2 col-form-label">更新期間開始時</label>
        <div class="col-md-3">
            <div class="d-flex">
                <select class="form-control mr-2" name="update_from_hh">
                    @for($i=0;$i<=23;$i++)
                        <option value="{{$i}}" @selected(old('update_from_hh',$p->update_from_hh ?? '')==$i)>{{ sprintf('%02d',$i) }}</option>
                    @endfor
                </select>
                <select class="form-control" name="update_from_mm">
                    @for($i=0;$i<=59;$i++)
                        <option value="{{$i}}" @selected(old('update_from_mm',$p->update_from_mm ?? '')==$i)>{{ sprintf('%02d',$i) }}</option>
                    @endfor
                </select>
            </div>
        </div>
    </div>

    <div class="form-group row">
        <label class="col-md-2 col-form-label">更新期間終了日</label>
        <div class="col-md-3">
            <input type="date" class="form-control" name="update_to_date"
                   value="{{ old('update_to_date',$p->update_to_date ?? '') }}">
        </div>
    </div>
    <div class="form-group row">
        <label class="col-md-2 col-form-label">更新期間終了時</label>
        <div class="col-md-3">
            <div class="d-flex">
                <select class="form-control mr-2" name="update_to_hh">
                    @for($i=0;$i<=23;$i++)
                        <option value="{{$i}}" @selected(old('update_to_hh',$p->update_to_hh ?? '')==$i)>{{ sprintf('%02d',$i) }}</option>
                    @endfor
                </select>
                <select class="form-control" name="update_to_mm">
                    @for($i=0;$i<=59;$i++)
                        <option value="{{$i}}" @selected(old('update_to_mm',$p->update_to_mm ?? '')==$i)>{{ sprintf('%02d',$i) }}</option>
                    @endfor
                </select>
            </div>
        </div>
    </div>

    {{-- 駐輪開始期間 --}}
    <div class="form-group row">
        <label class="col-md-2 col-form-label">駐輪開始期間</label>
        <div class="col-md-2 unit-after">
            <input type="number" class="form-control" name="park_start_period"
                   value="{{ old('park_start_period',$p->park_start_period ?? 20) }}">
            <span>日</span>
        </div>
    </div>

    {{-- リマインダー 種別/時間 --}}
    <div class="form-group row">
        <label class="col-md-2 col-form-label">リマインダー種別</label>
        <div class="col-md-6">
            @foreach(['daily'=>'毎日','alt'=>'一日おき','two'=>'二日おき'] as $v=>$label)
                <div class="form-check form-check-inline">
                    <input class="form-check-input" type="radio" name="reminder_type" id="rt_{{$v}}"
                           value="{{$v}}" @checked(old('reminder_type',$p->reminder_type ?? 'daily')==$v)>
                    <label class="form-check-label" for="rt_{{$v}}">{{ $label }}</label>
                </div>
            @endforeach
        </div>
    </div>
    <div class="form-group row">
        <label class="col-md-2 col-form-label">リマインダー時間</label>
        <div class="col-md-3 d-flex">
            <select class="form-control mr-2" name="reminder_hh">
                @for($i=0;$i<=23;$i++)
                    <option value="{{$i}}" @selected(old('reminder_hh',$p->reminder_hh ?? 20)==$i)>{{ sprintf('%02d',$i) }}</option>
                @endfor
            </select>
            <select class="form-control" name="reminder_mm">
                @for($i=0;$i<=59;$i++)
                    <option value="{{$i}}" @selected(old('reminder_mm',$p->reminder_mm ?? 20)==$i)>{{ sprintf('%02d',$i) }}</option>
                @endfor
            </select>
        </div>
    </div>

    {{-- 契約後即利用許可 / 項目表示設定 --}}
    <div class="form-group row">
        <label class="col-md-2 col-form-label">契約後即利用許可</label>
        <div class="col-md-6">
            @foreach([1=>'許可する',0=>'許可しない'] as $v=>$label)
                <div class="form-check form-check-inline">
                    <input class="form-check-input" type="radio" name="allow_use_after_contract" id="auc{{$v}}"
                           value="{{$v}}" @checked(old('allow_use_after_contract',$p->allow_use_after_contract ?? 1)==$v)>
                    <label class="form-check-label" for="auc{{$v}}">{{ $label }}</label>
                </div>
            @endforeach
        </div>
    </div>
    <div class="form-group row">
        <label class="col-md-2 col-form-label">項目表示設定：性別</label>
        <div class="col-md-6">
            @foreach([0=>'表示しない',1=>'表示する'] as $v=>$label)
            <div class="form-check form-check-inline">
                <input class="form-check-input" type="radio" name="disp_gender" id="dg{{$v}}"
                       value="{{$v}}" @checked(old('disp_gender',$p->disp_gender ?? 0)==$v)>
                <label class="form-check-label" for="dg{{$v}}">{{ $label }}</label>
            </div>
            @endforeach
        </div>
    </div>
    <div class="form-group row">
        <label class="col-md-2 col-form-label">項目表示設定：生年月日</label>
        <div class="col-md-6">
            @foreach([0=>'表示しない',1=>'表示する'] as $v=>$label)
            <div class="form-check form-check-inline">
                <input class="form-check-input" type="radio" name="disp_birth" id="db{{$v}}"
                       value="{{$v}}" @checked(old('disp_birth',$p->disp_birth ?? 0)==$v)>
                <label class="form-check-label" for="db{{$v}}">{{ $label }}</label>
            </div>
            @endforeach
        </div>
    </div>
    <div class="form-group row">
        <label class="col-md-2 col-form-label">項目表示設定：防犯登録番号</label>
        <div class="col-md-6">
            @foreach([0=>'表示しない',1=>'表示する'] as $v=>$label)
            <div class="form-check form-check-inline">
                <input class="form-check-input" type="radio" name="disp_crime" id="dc{{$v}}"
                       value="{{$v}}" @checked(old('disp_crime',$p->disp_crime ?? 0)==$v)>
                <label class="form-check-label" for="dc{{$v}}">{{ $label }}</label>
            </div>
            @endforeach
        </div>
    </div>

    {{-- 二点間距離 / 座標 / 電話番号 --}}
    <div class="form-group row">
        <label class="col-md-2 col-form-label">二点間距離</label>
        <div class="col-md-2 unit-after">
            <input type="number" class="form-control" name="distance_2points"
                   value="{{ old('distance_2points',$p->distance_2points ?? 800) }}">
            <span>m</span>
        </div>
    </div>
    <div class="form-group row">
        <label class="col-md-2 col-form-label">駐車場座標（緯度）</label>
        <div class="col-md-3">
            <input type="text" class="form-control" name="lat" value="{{ old('lat',$p->lat ?? '') }}">
        </div>
    </div>
    <div class="form-group row">
        <label class="col-md-2 col-form-label">駐車場座標（経度）</label>
        <div class="col-md-3">
            <input type="text" class="form-control" name="lng" value="{{ old('lng',$p->lng ?? '') }}">
        </div>
    </div>
    <div class="form-group row">
        <label class="col-md-2 col-form-label">電話番号</label>
        <div class="col-md-3">
            <input type="text" class="form-control" name="phone" value="{{ old('phone',$p->phone ?? '') }}">
        </div>
    </div>

    {{-- 契約形態（定期/一時） --}}
    <div class="form-group row">
        <label class="col-md-2 col-form-label">駐輪場契約形態（定期）</label>
        <div class="col-md-6">
            @foreach([1=>'定期利用可',0=>'定期利用不可'] as $v=>$label)
            <div class="form-check form-check-inline">
                <input class="form-check-input" type="radio" name="contract_regular" id="cr{{$v}}"
                       value="{{$v}}" @checked(old('contract_regular',$p->contract_regular ?? 1)==$v)>
                <label class="form-check-label" for="cr{{$v}}">{{ $label }}</label>
            </div>
            @endforeach
        </div>
    </div>
    <div class="form-group row">
        <label class="col-md-2 col-form-label">駐輪場契約形態（一時利用）</label>
        <div class="col-md-6">
            @foreach([1=>'一時利用可',0=>'一時利用不可'] as $v=>$label)
            <div class="form-check form-check-inline">
                <input class="form-check-input" type="radio" name="contract_onetime" id="co{{$v}}"
                       value="{{$v}}" @checked(old('contract_onetime',$p->contract_onetime ?? 1)==$v)>
                <label class="form-check-label" for="co{{$v}}">{{ $label }}</label>
            </div>
            @endforeach
        </div>
    </div>

    {{-- 申告制利用 / 手続方法 / 支払方法 --}}
    <div class="form-group row">
        <label class="col-md-2 col-form-label">申告制利用</label>
        <div class="col-md-8">
            <input type="text" class="form-control" name="declaration_use"
                   value="{{ old('declaration_use',$p->declaration_use ?? '') }}">
        </div>
    </div>
    <div class="form-group row">
        <label class="col-md-2 col-form-label">手続方法</label>
        <div class="col-md-8">
            <input type="text" class="form-control" name="procedure"
                   value="{{ old('procedure',$p->procedure ?? '') }}">
        </div>
    </div>
    <div class="form-group row">
        <label class="col-md-2 col-form-label">支払方法</label>
        <div class="col-md-8">
            <input type="text" class="form-control" name="payment"
                   value="{{ old('payment',$p->payment ?? '') }}">
        </div>
    </div>

    {{-- 利用可能時間制限 / 開始 / 終了 --}}
    <div class="form-group row">
        <label class="col-md-2 col-form-label">利用可能時間制限フラグ</label>
        <div class="col-md-6">
            @foreach(['limit'=>'制限あり','free'=>'制限なし（24時間）'] as $v=>$label)
            <div class="form-check form-check-inline">
                <input class="form-check-input" type="radio" name="use_time_limit_flag" id="utl_{{$v}}"
                       value="{{$v}}" @checked(old('use_time_limit_flag',$p->use_time_limit_flag ?? 'limit')==$v)>
                <label class="form-check-label" for="utl_{{$v}}">{{ $label }}</label>
            </div>
            @endforeach
        </div>
    </div>
    <div class="form-group row">
        <label class="col-md-2 col-form-label">利用可能時間（開始）</label>
        <div class="col-md-3 d-flex">
            <select class="form-control mr-2" name="use_from_hh">
                @for($i=0;$i<=23;$i++) <option value="{{$i}}" @selected(old('use_from_hh',$p->use_from_hh ?? '')==$i)>{{ sprintf('%02d',$i) }}</option> @endfor
            </select>
            <select class="form-control" name="use_from_mm">
                @for($i=0;$i<=59;$i++) <option value="{{$i}}" @selected(old('use_from_mm',$p->use_from_mm ?? '')==$i)>{{ sprintf('%02d',$i) }}</option> @endfor
            </select>
        </div>
    </div>
    <div class="form-group row">
        <label class="col-md-2 col-form-label">利用可能時間（終了）</label>
        <div class="col-md-3 d-flex">
            <select class="form-control mr-2" name="use_to_hh">
                @for($i=0;$i<=23;$i++) <option value="{{$i}}" @selected(old('use_to_hh',$p->use_to_hh ?? '')==$i)>{{ sprintf('%02d',$i) }}</option> @endfor
            </select>
            <select class="form-control" name="use_to_mm">
                @for($i=0;$i<=59;$i++) <option value="{{$i}}" @selected(old('use_to_mm',$p->use_to_mm ?? '')==$i)>{{ sprintf('%02d',$i) }}</option> @endfor
            </select>
        </div>
    </div>

    {{-- 常駐管理人 / 常駐時間 --}}
    <div class="form-group row">
        <label class="col-md-2 col-form-label">常駐管理人フラグ</label>
        <div class="col-md-6">
            @foreach([1=>'常駐',0=>'非常駐'] as $v=>$label)
            <div class="form-check form-check-inline">
                <input class="form-check-input" type="radio" name="resident_manager_flag" id="rm{{$v}}"
                       value="{{$v}}" @checked(old('resident_manager_flag',$p->resident_manager_flag ?? 1)==$v)>
                <label class="form-check-label" for="rm{{$v}}">{{ $label }}</label>
            </div>
            @endforeach
        </div>
    </div>
    <div class="form-group row">
        <label class="col-md-2 col-form-label">常駐時間（開始）</label>
        <div class="col-md-3 d-flex">
            <select class="form-control mr-2" name="resident_from_hh">
                @for($i=0;$i<=23;$i++) <option value="{{$i}}" @selected(old('resident_from_hh',$p->resident_from_hh ?? '')==$i)>{{ sprintf('%02d',$i) }}</option> @endfor
            </select>
            <select class="form-control" name="resident_from_mm">
                @for($i=0;$i<=59;$i++) <option value="{{$i}}" @selected(old('resident_from_mm',$p->resident_from_mm ?? '')==$i)>{{ sprintf('%02d',$i) }}</option> @endfor
            </select>
        </div>
    </div>
    <div class="form-group row">
        <label class="col-md-2 col-form-label">常駐時間（終了）</label>
        <div class="col-md-3 d-flex">
            <select class="form-control mr-2" name="resident_to_hh">
                @for($i=0;$i<=23;$i++) <option value="{{$i}}" @selected(old('resident_to_hh',$p->resident_to_hh ?? '')==$i)>{{ sprintf('%02d',$i) }}</option> @endfor
            </select>
            <select class="form-control" name="resident_to_mm">
                @for($i=0;$i<=59;$i++) <option value="{{$i}}" @selected(old('resident_to_mm',$p->resident_to_mm ?? '')==$i)>{{ sprintf('%02d',$i) }}</option> @endfor
            </select>
        </div>
    </div>

    {{-- 屋根 / シール発行機 --}}
    <div class="form-group row">
        <label class="col-md-2 col-form-label">屋根フラグ</label>
        <div class="col-md-6">
            @foreach([1=>'屋根あり',0=>'屋根なし'] as $v=>$label)
            <div class="form-check form-check-inline">
                <input class="form-check-input" type="radio" name="roof_flag" id="rf{{$v}}"
                       value="{{$v}}" @checked(old('roof_flag',$p->roof_flag ?? 1)==$v)>
                <label class="form-check-label" for="rf{{$v}}">{{ $label }}</label>
            </div>
            @endforeach
        </div>
    </div>
    <div class="form-group row">
        <label class="col-md-2 col-form-label">シール発行機フラグ</label>
        <div class="col-md-6">
            @foreach([1=>'シール発行機あり',0=>'シール発行機なし'] as $v=>$label)
            <div class="form-check form-check-inline">
                <input class="form-check-input" type="radio" name="seal_machine_flag" id="sm{{$v}}"
                       value="{{$v}}" @checked(old('seal_machine_flag',$p->seal_machine_flag ?? 1)==$v)>
                <label class="form-check-label" for="sm{{$v}}">{{ $label }}</label>
            </div>
            @endforeach
        </div>
    </div>

    {{-- 駐輪場利用方法 / 定期更新期間 / 空き待ち予約 / 特記事項 --}}
    <div class="form-group row">
        <label class="col-md-2 col-form-label">駐輪場利用方法</label>
        <div class="col-md-9">
            <textarea class="form-control" name="usage_method" rows="2">{{ old('usage_method',$p->usage_method ?? '') }}</textarea>
        </div>
    </div>
    <div class="form-group row">
        <label class="col-md-2 col-form-label">定期更新期間</label>
        <div class="col-md-6">
            <input type="text" class="form-control" name="periodic_update_period"
                   value="{{ old('periodic_update_period',$p->periodic_update_period ?? '') }}">
        </div>
    </div>
    <div class="form-group row">
        <label class="col-md-2 col-form-label">空き待ち予約</label>
        <div class="col-md-6">
            <input type="text" class="form-control" name="waiting_reservation"
                   value="{{ old('waiting_reservation',$p->waiting_reservation ?? '') }}">
        </div>
    </div>
    <div class="form-group row">
        <label class="col-md-2 col-form-label">特記事項</label>
        <div class="col-md-9">
            <textarea class="form-control" name="special_note" rows="2">{{ old('special_note',$p->special_note ?? '') }}</textarea>
        </div>
    </div>

    {{-- 学生証確認種別 / 減免案内表示 / 年齢 / 開始月数 / 年跨ぎ --}}
    <div class="form-group row">
        <label class="col-md-2 col-form-label">学生証確認種別</label>
        <div class="col-md-8">
            @foreach(['none'=>'確認しない','year'=>'年1回','reissue'=>'再発行時'] as $v=>$label)
            <div class="form-check form-check-inline">
                <input class="form-check-input" type="radio" name="student_card_check" id="scc_{{$v}}"
                       value="{{$v}}" @checked(old('student_card_check',$p->student_card_check ?? 'none')==$v)>
                <label class="form-check-label" for="scc_{{$v}}">{{ $label }}</label>
            </div>
            @endforeach
        </div>
    </div>
    <div class="form-group row">
        <label class="col-md-2 col-form-label">減免案内表示フラグ</label>
        <div class="col-md-6">
            @foreach([0=>'表示しない',1=>'表示する'] as $v=>$label)
            <div class="form-check form-check-inline">
                <input class="form-check-input" type="radio" name="reduction_notice_flag" id="rnf{{$v}}"
                       value="{{$v}}" @checked(old('reduction_notice_flag',$p->reduction_notice_flag ?? 0)==$v)>
                <label class="form-check-label" for="rnf{{$v}}">{{ $label }}</label>
            </div>
            @endforeach
        </div>
    </div>
    <div class="form-group row">
        <label class="col-md-2 col-form-label">減免対象年齢</label>
        <div class="col-md-2">
            <input type="number" class="form-control" name="reduction_age"
                   value="{{ old('reduction_age',$p->reduction_age ?? 90) }}">
        </div>
    </div>
    <div class="form-group row">
        <label class="col-md-2 col-form-label">減免案内表示開始月数</label>
        <div class="col-md-2">
            <input type="number" class="form-control" name="reduction_notice_start_months"
                   value="{{ old('reduction_notice_start_months',$p->reduction_notice_start_months ?? 6) }}">
        </div>
    </div>
    <div class="form-group row">
        <label class="col-md-2 col-form-label">年跨ぎ</label>
        <div class="col-md-6">
            @foreach([0=>'なし',1=>'有り'] as $v=>$label)
            <div class="form-check form-check-inline">
                <input class="form-check-input" type="radio" name="cross_year_flag" id="cy{{$v}}"
                       value="{{$v}}" @checked(old('cross_year_flag',$p->cross_year_flag ?? 0)==$v)>
                <label class="form-check-label" for="cy{{$v}}">{{ $label }}</label>
            </div>
            @endforeach
        </div>
    </div>

    {{-- 画像アップロード（SAMPLE表示） --}}
    <div class="form-group row">
        <label class="col-md-2 col-form-label">駐輪場画像１</label>
        <div class="col-md-6">
            <input type="file" name="parking_image1" class="form-control-file">
            <img src="{{ $p->parking_image1_url ?? '/img/sample.png' }}" class="img-thumbnail mt-2" alt="SAMPLE" style="max-width:180px">
        </div>
    </div>
    <div class="form-group row">
        <label class="col-md-2 col-form-label">駐輪場画像２</label>
        <div class="col-md-6">
            <input type="file" name="parking_image2" class="form-control-file">
            <img src="{{ $p->parking_image2_url ?? '/img/sample.png' }}" class="img-thumbnail mt-2" alt="SAMPLE" style="max-width:180px">
        </div>
    </div>

    {{-- 備考（最下段に配置） --}}
    <div class="form-group row">
        <label class="col-md-2 col-form-label">備考</label>
        <div class="col-md-9">
            <textarea class="form-control" name="note" rows="2">{{ old('note',$p->note ?? '') }}</textarea>
        </div>
    </div>

</div>
