import i from"./TopBar.8157552e.js";import n from"./Container.f87d9f62.js";import m from"./Content.e22a1fd6.js";import a from"./Page.3927bdbf.js";import s from"./PageHeader.a5f457a5.js";import p from"./PageHeaderTitle.3ed783af.js";import l from"./PageBody.dec1fae1.js";import c from"./Button.f17dffc9.js";import f from"./List.d5d221b1.js";import u from"./ListItem.ee1e88fb.js";import _ from"./StatusBubble.4f1d8322.js";import d from"./NotificationBadge.b6fae3d5.js";import g from"./MainLayout.17290af6.js";import y from"./SettingsLayout.3305573b.js";import h from"./SettingsSegment.e8fdfb41.js";import b from"./FormInput.7debc7c5.js";import v from"./FormSelect.6e35ae7d.js";import x from"./FormTextarea.5b8e3d32.js";import S from"./Form.2cdcadd9.js";import F from"./FormActions.83ccca91.js";import k from"./Tabs.286fcb8b.js";import{n as C}from"./plugin-vue2_normalizer.000ba15c.js";import"./TopBar.27b84f08.js";import"./Dropdown.d1060583.js";import"./DropdownList.02c48c2f.js";import"./DropdownListItem.ac31464c.js";import"./IconMoon.ade3e41b.js";import"./IconSun.8809e5d7.js";import"./IconSearch.27dac870.js";import"./IconButton.eadc8d3d.js";import"./Breadcrumbs.d39e2491.js";import"./BreadcrumbsItem.da3f8155.js";import"./TopBarTabBarContainer.3bdb2bb3.js";import"./TabBar.c1d45ed5.js";import"./TabBarItem.e9886f0a.js";import"./Confirm.888708f1.js";import"./Notification.d432029f.js";import"./IconDanger.2f6e115d.js";import"./IconWarning.ca92fb65.js";import"./IconSuccess.09b85716.js";import"./IconInfo.ad7662f9.js";import"./SearchPalette.282fdde5.js";import"./notification.db2f2ae7.js";import"./app.79e1f42d.js";import"./FormGroup.efd02a6a.js";import"./Label.9d0d3ee0.js";import"./ErrorText.b141a597.js";import"./HelperText.14a7ed0b.js";import"./IconClipboard.8551be1b.js";import"./IconKey.455a255f.js";const P={metaInfo(){return{title:`${this.__("Edit article")}`}},layout:g,components:{TopBar:i,Container:n,Content:m,Page:a,PageHeader:s,PageHeaderTitle:p,PageBody:l,Button:c,List:f,ListItem:u,StatusBubble:_,NotificationBadge:d,FormInput:b,FormTextarea:x,SettingsLayout:y,SettingsSegment:h,Form:S,FormSelect:v,FormActions:F,Tabs:k},props:{article:Object,categories:Object},data(){return{sending:!1,form:{title:this.article.title,content:this.article.content,category_id:this.article.documentation_category_id}}},methods:{submit(){this.$inertia.patch(this.route("admin.documentation.articles.update",this.article.id),this.form,{onStart:()=>this.sending=!0,onFinish:()=>this.sending=!1})}}};var T=function(){var t=this,r=t._self._c;return r("Page",[r("TopBar"),r("Content",[r("Container",[r("PageHeader",{scopedSlots:t._u([{key:"start",fn:function(){return[r("PageHeaderTitle",[t._v(t._s(t.__("Edit article")))])]},proxy:!0}])}),r("PageBody",[r("SettingsLayout",{scopedSlots:t._u([{key:"nav",fn:function(){return[r("Tabs")]},proxy:!0},{key:"segments",fn:function(){return[r("SettingsSegment",{scopedSlots:t._u([{key:"title",fn:function(){return[t._v(t._s(t.__("Edit")))]},proxy:!0},{key:"form",fn:function(){return[r("form",{staticClass:"space-y-4",on:{submit:function(o){return o.preventDefault(),t.submit.apply(null,arguments)}}},[r("FormInput",{attrs:{label:t.__("Title"),errors:t.$page.props.errors.title},model:{value:t.form.title,callback:function(o){t.$set(t.form,"title",o)},expression:"form.title"}}),r("FormSelect",{attrs:{label:t.__("Category"),errors:t.$page.props.errors.category_id},model:{value:t.form.category_id,callback:function(o){t.$set(t.form,"category_id",o)},expression:"form.category_id"}},t._l(t.categories,function(o,e){return r("option",{domProps:{value:e,textContent:t._s(o)}})}),0),r("FormTextarea",{attrs:{rows:"10","helper-text":"You may use markdown in this field for markup",label:t.__("Content"),errors:t.$page.props.errors.content},model:{value:t.form.content,callback:function(o){t.$set(t.form,"content",o)},expression:"form.content"}}),r("FormActions",[r("Button",[t._v(t._s(t.__("Save")))])],1)],1)]},proxy:!0}])})]},proxy:!0}])})],1)],1)],1)],1)},B=[],$=C(P,T,B,!1,null,null,null,null);const Tt=$.exports;export{Tt as default};
