<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="{{$append->id}}">
    <input type="hidden" name="program_id" value="{{$program->id}}">
    @if($program->video_pivots->last()->stop_image)
    <label class="block my-2">
        结束图像
            <img src="{{$program->video_pivots->last()->stop_image}}" alt="结束图片">
    </label>
    @endif
    <label class="block my-2">
        追加内容(点播可不填)
        <input class="form-input border-0 border-b-2 w-full" type="text" name="name" value="{{$append->name}}">
    </label>
    <label class="block my-2">
        点播老板
        <input class="form-input border-0 border-b-2 w-full" type="text" name="from" value="{{$append->from}}">
    </label>
    <label class="block my-2">
        是否点播(不是追加)
        <input class="form-checkbox" type="checkbox" name="is_original" value="1" @if($append->is_original == 1) checked @endif>
    </label>
    <label class="block my-2">
        分
        <input class="form-input border-0 border-b-2 w-full" type="number" step="0.5" name="price" value="{{$append->price}}">
    </label>
    <label class="block my-2">
        补充说明
        <input class="form-input border-0 border-b-2 w-full" type="text" name="append" value="{{$append->append}}">
    </label>
    <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>
    <div class="block my-2">
        <a class="px-6 py-2 inline-block rounded-full bg-cyan-600 text-white" target="_blank"
           href="https://www.bilibili.com/video/{{$program->video_pivots->first()->video_bvid}}?p={{$program->video_pivots->first()->start_part}}&t={{$program->video_pivots->first()->start_sec}}"
           title="P{{$program->video_pivots->first()->start_part}}#{{$program->video_pivots->first()->start_time}}"
        >打开至开始位置</a>
        <a class="px-6 py-2 inline-block rounded-full bg-cyan-600 text-white" target="_blank"
           href="https://www.bilibili.com/video/{{$program->video_pivots->last()->video_bvid}}?p={{$program->video_pivots->last()->stop_part}}&t={{$program->video_pivots->last()->stop_sec}}"
           title="P{{$program->video_pivots->last()->stop_part}}#{{$program->video_pivots->last()->stop_time}}"
        >打开至结束位置</a>
        <a class="px-6 py-2 inline-block rounded-full bg-cyan-600 text-white"
           href="{{route('program.construct.append.list', ['program'=>$program->id])}}"
        >返回列表</a>
    </div>
</form>
@include("common.footer")
</body>
</html>