@include('admin.crud.form', [ 'action' => route('admin.demo-videos.update', $edit_data->id), 'formId' => 'edit-demo-video-form', 'submitText' => 'Update Demo Video', 'class' => 'ajax-crud-form', 'redirect' => route('admin.demo-videos.index'), 'method' => 'PUT', 'fields' => [ [ 'type' => 'text', 'name' => 'title', 'id' => 'title', 'label' => 'Video Title', 'placeholder' => 'Enter Video Title', 'required' => true, 'value' => $edit_data->title, 'col' => 12 ], [ 'type' => 'textarea', 'name' => 'description', 'id' => 'description', 'label' => 'Description', 'placeholder' => 'Enter Video Description', 'value' => $edit_data->description, 'col' => 12 ], [ 'type' => 'select', 'name' => 'provider', 'id' => 'provider', 'label' => 'Provider', 'required' => true, 'options' => [ 'vimeo' => 'Vimeo', 'youtube' => 'YouTube', 's3' => 'S3', 'local' => 'Local' ], 'value' => $edit_data->provider, 'col' => 4 ], [ 'type' => 'text', 'name' => 'provider_id', 'id' => 'provider_id', 'label' => 'Video URL', 'placeholder' => 'https://vimeo.com/123456789', 'value' => $edit_data->provider_id, 'required' => true, 'col' => 8 ], [ 'type' => 'select', 'name' => 'status', 'id' => 'status', 'label' => 'Status', 'required' => true, 'options' => [ '1' => 'Active', '0' => 'Inactive' ], 'value' => $edit_data->status, 'col' => 4 ], [ 'type' => 'select2', 'name' => 'course_id', 'id' => 'course_id', 'label' => 'Course', 'options' => $courses, 'value' => $edit_data->course_id, 'col' => 8, 'placeholder' => 'Select Course (Optional)' ], [ 'type' => 'seperator', 'col' => 12 ], [ 'type' => 'image', 'name' => 'thumbnail', 'label' => 'Thumbnail', 'presetKey' => 'demo_videos_thumbnail', 'subPreset' => 'original', 'value' => is_array($edit_data->thumbnail) ? ($edit_data->thumbnail_url['thumb']) : '', 'col' => 8, 'note' => 'Thumbnail will be auto-generated from Vimeo if not provided' ], ] ])