<html lang="zh">
<head>
    <meta charset="UTF-8">
    <title>录播节目修改</title>
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <link href="{{ mix('/css/app.css') }}" rel="stylesheet"/>
</head>
<body>
@include("common.header")
<form class="w-full lg:w-1/2 lg:ml-6 border-2" action="" method="post" enctype="multipart/form-data">
    <input type="hidden" name="id" value="{{$program->id}}">
    <label class="block my-2">
        节目名称
        <input class="form-input border-0 border-b-2 w-full" autocomplete="off" type="text" required name="name" value="{{ old("name", $program->name) }}">
    </label>
    <label class="block my-2">
        节目难度
        <input class="form-input border-0 border-b-2 w-full" autocomplete="off" type="text" name="difficulty" value="{{ old("difficulty", $program->difficulty) }}">
    </label>
    <label class="block my-2">
        节目要求
        <input class="form-input border-0 border-b-2 w-full" autocomplete="off" type="text" name="desc" value="{{ old("desc", $program->desc) }}">
    </label>
    <label class="block my-2">
        是否结束维护
        <input class="form-checkbox" type="checkbox" name="status" value="1" @if(old("status", $program->status) == 1) checked @endif>
    </label>
    @include("common.form_error")
    <div class="block my-2 text-center">
        <input class="px-6 py-2 inline-block rounded-full bg-cyan-600 text-white" type="submit">
    </div>
    @if($program->id)
    <div class="block my-2">
        <a href="{{route("program.construct.video.list", ["program"=>$program->id])}}"
           class="block px-6 py-2 inline-block rounded-full bg-cyan-600 text-white">
            关联视频列表
        </a>
        <a href="{{route("program.construct.append.list", ["program"=>$program->id])}}"
           class="block px-6 py-2 inline-block rounded-full bg-cyan-600 text-white">
            关联点播老板列表
        </a>
    </div>
    @endif
</form>
@if($program->id)
<div class="w-full lg:w-1/2 lg:ml-6 flex justify-between px-4">
    <a class="block px-6 py-2 inline-block rounded-full bg-cyan-600 text-white" href="{{route("program.construct.edit", ["program"=>$program->id - 1])}}">上一个</a>
    <a class="block px-6 py-2 inline-block rounded-full bg-cyan-600 text-white" href="{{route("program.construct.edit", ["program"=>$program->id + 1])}}">下一个</a>
</div>
@endif
@include("common.footer")
</body>
</html>