import e from"./TopBar.05f3ac34.js";import i from"./Container.f87d9f62.js";import n from"./Content.e22a1fd6.js";import m from"./Page.3927bdbf.js";import p from"./PageHeader.a5f457a5.js";import s from"./PageHeaderTitle.3ed783af.js";import a from"./PageBody.dec1fae1.js";import l from"./Button.f17dffc9.js";import u from"./List.d5d221b1.js";import f from"./ListItem.ee1e88fb.js";import c from"./StatusBubble.4f1d8322.js";import _ from"./NotificationBadge.b6fae3d5.js";import d from"./MainLayout.17290af6.js";import g from"./IconBox.e6c961ac.js";import y from"./IconGlobe.07030b80.js";import h from"./IconStorage.ef2b2e41.js";import b from"./Modal.a59fc373.js";import x from"./ModalContainer.51de3ea9.js";import I from"./FormInput.7debc7c5.js";import k from"./FormTextarea.5b8e3d32.js";import v from"./FormActions.83ccca91.js";import C from"./EmptyImage.4bfdf9ac.js";import{n as B}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"./IconClose.edb7c8fd.js";import"./Form.2cdcadd9.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.__("Support")}`}},layout:d,components:{TopBar:e,Container:i,Content:n,Page:m,PageHeader:p,PageHeaderTitle:s,PageBody:a,Button:l,List:u,ListItem:f,StatusBubble:c,NotificationBadge:_,IconBox:g,IconGlobe:y,IconStorage:h,Modal:b,ModalContainer:x,FormInput:I,FormTextarea:k,FormActions:v,EmptyImage:C},props:{tickets:Object},data(){return{loading:!1,modalIsOpen:!1,form:{title:null,content:null},breadcrumbs:[{title:this.$page.props.settings.name,to:"/"},{title:this.__("Support"),to:this.route("support.index")}]}},methods:{submit(){this.loading=!0,this.$inertia.post(this.route("support.store"),this.form,{onFinish:()=>{Object.keys(this.$page.props.errors).length||(this.form.title=null,this.form.content=null,this.loading=!1,this.modalIsOpen=!1)}})}}};var $=function(){var t=this,o=t._self._c;return o("Page",[o("Portal",{attrs:{to:"modals"}},[o("ModalContainer",[t.modalIsOpen?o("Modal",{on:{close:function(r){t.modalIsOpen=!1},submit:t.submit},scopedSlots:t._u([{key:"title",fn:function(){return[t._v(t._s(t.__("Create support request")))]},proxy:!0},{key:"form",fn:function(){return[o("FormInput",{attrs:{label:t.__("Title"),errors:t.$page.props.errors.title},model:{value:t.form.title,callback:function(r){t.$set(t.form,"title",r)},expression:"form.title"}}),o("FormTextarea",{attrs:{label:t.__("Content"),errors:t.$page.props.errors.content},model:{value:t.form.content,callback:function(r){t.$set(t.form,"content",r)},expression:"form.content"}})]},proxy:!0},{key:"form-actions",fn:function(){return[o("Button",{domProps:{textContent:t._s(t.__("Create"))}})]},proxy:!0}],null,!1,1024002657)}):t._e()],1)],1),o("TopBar",{attrs:{breadcrumbs:t.breadcrumbs}}),o("Content",[o("Container",[o("PageHeader",{scopedSlots:t._u([{key:"start",fn:function(){return[o("PageHeaderTitle",[t._v(t._s(t.__("Support")))])]},proxy:!0},{key:"end",fn:function(){return[o("Button",{on:{click:function(r){t.modalIsOpen=!0}}},[t._v(t._s(t.__("Create ticket")))])]},proxy:!0}])}),o("PageBody",[t.tickets.total?t._e():o("EmptyImage"),o("List",t._l(t.tickets.data,function(r){return o("ListItem",{key:r.id,scopedSlots:t._u([{key:"title",fn:function(){return[o("inertia-link",{staticClass:"text-primary font-medium",attrs:{href:t.route("support.show",r.id)}},[t._v(" "+t._s(r.title)+" ")])]},proxy:!0}],null,!0)})}),1)],1)],1)],1)],1)},S=[],F=B(P,$,S,!1,null,null,null,null);const Ot=F.exports;export{Ot as default};
