1import{u as j,j as e}from"./app-CZXmoS2b.js";import{A as v}from"./AppHead-3v-wai9g.js";import{L as r,I as d}from"./label-Cfw2zy71.js";import{B as g}from"./button-DKNsD8o4.js";import{I as m}from"./input-xdGltdbk.js";import{S as u,a as c,b as n,c as p,d as o}from"./select-1YKveYkl.js";import{A as f}from"./app-layout-DZz2eUl-.js";import{L as b}from"./loader-circle-CO3TcOsc.js";/* empty css */import"./index-DqvabXEY.js";import"./index-DroZaziI.js";import"./app-sidebar-header-BchwWZ3h.js";import"./index-BBIZTMjr.js";const N=[{title:"Videos",href:"/admin/video"},{title:"Create video",href:"/admin/video/create"}];function B(){const{data:s,setData:a,post:x,processing:i,errors:l}=j({title:"",video_id:"",video_type:"youtube",status:1}),h=t=>{t.preventDefault(),x(route("admin.video.store"))};return e.jsxs(f,{breadcrumbs:N,children:[e.jsx(v,{title:"Create video"}),e.jsx("form",{className:"flex flex-col gap-6 p-4",onSubmit:h,children:e.jsxs("div",{className:"grid gap-6",children:[e.jsxs("div",{className:"grid gap-2",children:[e.jsx(r,{htmlFor:"title",children:"Title"}),e.jsx(m,{id:"title",type:"text",required:!0,autoComplete:"title",value:s.title,onChange:t=>a("title",t.target.value),disabled:i,placeholder:"Title"}),e.jsx(d,{message:l.title,className:"mt-2"})]}),e.jsxs("div",{className:"grid gap-2",children:[e.jsx(r,{htmlFor:"video_id",children:"Video Id"}),e.jsx(m,{id:"video_id",type:"text",required:!0,autoComplete:"video_id",value:s.video_id,onChange:t=>a("video_id",t.target.value),disabled:i,placeholder:"Video Id"}),e.jsx(d,{message:l.video_id,className:"mt-2"})]}),e.jsxs("div",{className:"grid gap-2",children:[e.jsx(r,{htmlFor:"video_type",children:"Video type"}),e.jsxs(u,{onValueChange:t=>a("video_type",t),defaultValue:s.video_type,children:[e.jsx(c,{className:"w-full",children:e.jsx(n,{placeholder:"video_type"})}),e.jsx(p,{children:e.jsx(o,{value:"youtube",children:"Youtube"})})]}),e.jsx(d,{message:l.status})]}),e.jsxs("div",{className:"grid gap-2",children:[e.jsx(r,{htmlFor:"status",children:"Status"}),e.jsxs(u,{onValueChange:t=>a("status",Number(t)),defaultValue:s.status.toString(),children:[e.jsx(c,{className:"w-full",children:e.jsx(n,{placeholder:"Status"})}),e.jsxs(p,{children:[e.jsx(o,{value:"1",children:"Active"}),e.jsx(o,{value:"0",children:"Disable"})]})]}),e.jsx(d,{message:l.status})]}),e.jsxs(g,{type:"submit",className:"mt-2 w-full",tabIndex:5,disabled:i,children:[i&&e.jsx(b,{className:"h-4 w-4 animate-spin"}),"Create Video"]})]})})]})}export{B as default};
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.