1import{A}from"./AuthenticatedLayout-BgPi6SK7.js";import{Z as k,i as I,r as n,f as i,c as w,a as t,w as f,b as a,d as j,o as m,F as b,j as _,e as S,k as x,g as B,T as L}from"./app-BFBm0Bhp.js";import{T as O,A as E}from"./Attachment-ui7ykot5.js";import{T as F}from"./TagInput-B24tt8Te.js";import{S as N}from"./Switch-lcdVR_Lx.js";import{P as H}from"./PrimaryButton-DQRXstZk.js";import{_ as J}from"./InputError-gS6WMAxM.js";import{_ as M}from"./TextInput-BleaLv5g.js";import{_ as Z}from"./InputLabel-COeR7jGs.js";import{_ as q}from"./_plugin-vue_export-helper-DlAUqK2U.js";import"./ApplicationLogo-BDZZhcqx.js";import"./NavLink-XJ1F9B8R.js";import"./TextOutline-DJTNpM16.js";import"./DocumentTextOutline-CSPECrKp.js";import"./InformationCircleOutline-B09VKpeu.js";import"./ChevronDownOutline-I8s4miqi.js";const z={name:"AboutForm",components:{InputLabel:Z,TextInput:M,InputError:J,PrimaryButton:H,Switch:N,TagInput:F,Attachment:E,TextBuilder:O,Link:I,AuthenticatedLayout:A,Head:k},props:{about:{type:Object,default:[]},categories:{type:Object,default:[]},forCategory:{type:Object,default:[]}},data(){return{form:L({name:this.about.name??{lv:"",en:""},published:this.about.published??!1,categories:this.about.categories??[],job_title:this.about.job_title??{lv:"",en:""},email:this.about.email??"",phone:this.about.phone??"",phone_office:this.about.phone_office??"",image:{image_title:this.about.image_title??{lv:null,en:null},image:this.about.image??null,photoPreview:null},author:this.about.author??{lv:"",en:""},_method:"post"})}},methods:{handleToggle(s){this.form.published=s},updatePhotoPreview(s){this.form.image.image=s.content,this.form.image.photoPreview=s.photoPreview},updatePhotoTitle(s){this.form.image.image_title=s.title},updateCategories(s){this.form.categories=s},submit(){var s;(s=this.about)!=null&&s.id?(this.form._method="put",this.form.post(route("admin.about.update",{about:this.about.id}),{preserveState:"errors"})):this.form.post(route("admin.about.store"),{preserveState:"errors"})}}},D={key:0,class:"font-semibold text-xl text-gray-800 leading-tight"},G={key:1,class:"font-semibold text-xl text-gray-800 leading-tight"},K={class:"py-12"},Q={class:"bg-white overflow-hidden shadow-sm sm:rounded-lg"},R={class:"space-y-2"},W={class:"flex items-center gap-4"},X={key:0,class:"text-sm text-gray-600"};function Y(s,l,d,$,e,h){var y;const v=n("Head"),u=n("InputLabel"),T=n("Switch"),U=n("TagInput"),p=n("InputError"),c=n("TextInput"),V=n("Attachment"),P=n("PrimaryButton"),C=n("AuthenticatedLayout");return m(),i(b,null,[(y=d.about)!=null&&y.id?(m(),w(v,{key:0,title:"Edit About"})):(m(),w(v,{key:1,title:"Add About"})),t(C,null,{header:f(()=>{var r;return[(r=d.about)!=null&&r.id?(m(),i("h2",D,"Edit About")):(m(),i("h2",G,"Add About"))]}),default:f(()=>[a("div",K,[a("div",Q,[a("form",{class:"space-y-5 p-4",enctype:"multipart/form-data",onSubmit:l[3]||(l[3]=j(r=>h.submit(),["prevent"]))},[a("div",R,[t(u,{for:"published",value:"Activate"}),t(T,{isOn:e.form.published,"onUpdate:isOn":h.handleToggle,id:"active"},null,8,["isOn","onUpdate:isOn"])]),a("div",null,[t(U,{onUpdateTags:h.updateCategories,"allow-creating-new-tags":!1,options:d.categories,selectedTags:d.about.categories??d.forCategory??[]},{label:f(()=>[...l[4]||(l[4]=[a("span",null,"Categories",-1)])]),placeholder:f(()=>[...l[5]||(l[5]=[a("h1",null,"Categories",-1)])]),_:1},8,["onUpdateTags","options","selectedTags"]),t(p,{class:"mt-2",message:e.form.errors.categories},null,8,["message"])]),(m(!0),i(b,null,_(e.form.name,(r,o)=>(m(),i("div",null,[t(u,{for:"name"+o.toUpperCase(),value:"Title "+o.toUpperCase()},null,8,["for","value"]),t(c,{id:"name"+o.toUpperCase(),type:"text",class:"mt-1 block w-full",modelValue:e.form.name[o],"onUpdate:modelValue":g=>e.form.name[o]=g,autofocus:"",autocomplete:"name"},null,8,["id","modelValue","onUpdate:modelValue"]),t(p,{class:"mt-2",message:e.form.errors["name."+o]},null,8,["message"])]))),256)),(m(!0),i(b,null,_(e.form.name,(r,o)=>(m(),i("div",null,[t(u,{for:"job_title"+o.toUpperCase(),value:"Job Title "+o.toUpperCase()},null,8,["for","value"]),t(c,{id:"job_title"+o.toUpperCase(),type:"text",class:"mt-1 block w-full",modelValue:e.form.job_title[o
1],"onUpdate:modelValue":g=>e.form.job_title[o]=g},null,8,["id","modelValue","onUpdate:modelValue"]),t(p,{class:"mt-2",message:e.form.errors["job_title."+o]},null,8,["message"])]))),256)),a("div",null,[t(u,{for:"email",value:"Email"}),t(c,{id:"email",type:"text",class:"mt-1 block w-full",modelValue:e.form.email,"onUpdate:modelValue":l[0]||(l[0]=r=>e.form.email=r)},null,8,["modelValue"]),t(p,{class:"mt-2",message:e.form.errors.email},null,8,["message"])]),a("div",null,[t(u,{for:"phone",value:"Phone"}),t(c,{id:"phone",type:"text",class:"mt-1 block w-full",modelValue:e.form.phone,"onUpdate:modelValue":l[1]||(l[1]=r=>e.form.phone=r)},null,8,["modelValue"]),t(p,{class:"mt-2",message:e.form.errors.phone},null,8,["message"])]),a("div",null,[t(u,{for:"phone_office",value:"Phone Office"}),t(c,{id:"phone_office",type:"text",class:"mt-1 block w-full",modelValue:e.form.phone_office,"onUpdate:modelValue":l[2]||(l[2]=r=>e.form.phone_office=r)},null,8,["modelValue"]),t(p,{class:"mt-2",message:e.form.errors.phone_office},null,8,["message"])]),a("div",null,[t(V,{attachments:e.form.image.image,attachmentTitle:e.form.image.image_title,photoPreview:e.form.image.photoPreview,onUpdatePhotoPreview:h.updatePhotoPreview,onUpdatePhotoTitle:h.updatePhotoTitle},{title:f(()=>[...l[6]||(l[6]=[a("span",{class:"pl-2"},"Featured image",-1)])]),_:1},8,["attachments","attachmentTitle","photoPreview","onUpdatePhotoPreview","onUpdatePhotoTitle"])]),(m(!0),i(b,null,_(e.form.author,(r,o)=>(m(),i("div",null,[t(u,{for:"author"+o.toUpperCase(),value:"Author "+o.toUpperCase()},null,8,["for","value"]),t(c,{id:"author"+o.toUpperCase(),type:"text",class:"mt-1 block w-full",modelValue:e.form.author[o],"onUpdate:modelValue":g=>e.form.author[o]=g},null,8,["id","modelValue","onUpdate:modelValue"]),t(p,{class:"mt-2",message:e.form.errors["author."+o]},null,8,["message"])]))),256)),a("div",W,[t(P,{disabled:e.form.processing},{default:f(()=>[...l[7]||(l[7]=[S("Save",-1)])]),_:1},8,["disabled"]),t(x,{"enter-active-class":"transition ease-in-out","enter-from-class":"opacity-0","leave-active-class":"transition ease-in-out","leave-to-class":"opacity-0"},{default:f(()=>[e.form.recentlySuccessful?(m(),i("p",X,"Saved.")):B("",!0)]),_:1})])],32)])])]),_:1})],64)}const ge=q(z,[["render",Y]]);export{ge 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.