import i from"./TopBar.8157552e.js";import e from"./Container.f87d9f62.js";import s from"./Content.e22a1fd6.js";import a from"./Page.3927bdbf.js";import m from"./PageHeader.a5f457a5.js";import n from"./PageHeaderTitle.3ed783af.js";import p from"./PageBody.dec1fae1.js";import l from"./Button.f17dffc9.js";import c from"./List.d5d221b1.js";import u from"./ListItem.ee1e88fb.js";import f from"./StatusBubble.4f1d8322.js";import d from"./NotificationBadge.b6fae3d5.js";import _ from"./MainLayout.17290af6.js";import h from"./IconBox.e6c961ac.js";import v from"./IconGlobe.07030b80.js";import g from"./IconStorage.ef2b2e41.js";import C from"./Modal.a59fc373.js";import y from"./ModalContainer.51de3ea9.js";import b from"./FormInput.7debc7c5.js";import x from"./FormTextarea.5b8e3d32.js";import k from"./FormActions.83ccca91.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 F={metaInfo(){return{title:`${this.ticket.title}`}},layout:_,components:{TopBar:i,Container:e,Content:s,Page:a,PageHeader:m,PageHeaderTitle:n,PageBody:p,Button:l,List:c,ListItem:u,StatusBubble:f,NotificationBadge:d,IconBox:h,IconGlobe:v,IconStorage:g,Modal:C,ModalContainer:y,FormInput:b,FormTextarea:x,FormActions:k},props:{ticket:Object,replies:Array},data(){return{form:{content:null}}},methods:{reply(){this.loading=!0,this.$inertia.post(this.route("admin.support.reply",this.ticket.id),this.form,{onStart:()=>this.sending=!0,onFinish:()=>{this.loading=!1,Object.keys(this.$page.props.errors).length||(this.form.content=null)}})},close(){this.$inertia.post(this.route("admin.support.close",this.ticket.id),{onStart:()=>this.loading=!0,onFinish:()=>this.loading=!1})}}};var P=function(){var t=this,o=t._self._c;return o("Page",[o("TopBar"),o("Content",[o("Container",[o("PageHeader",{scopedSlots:t._u([{key:"start",fn:function(){return[o("PageHeaderTitle",[t._v(t._s(t.ticket.title))])]},proxy:!0}])}),o("PageBody",[o("div",{staticClass:"space-y-6"},[o("ul",{staticClass:"space-y-6"},[o("li",{staticClass:"p-6 rounded shadow bg-surface-3"},[o("div",{staticClass:"flex space-x-4"},[o("div",[o("img",{staticClass:"w-8 h-8 rounded-avatar bg-surface-2",attrs:{src:t.ticket.user.avatar}})]),o("div",[o("h3",{staticClass:"font-semibold text-small text-body"},[t._v(t._s(t.ticket.user.name))]),o("p",{staticClass:"text-medium-emphasis"},[t._v(t._s(t.ticket.content))])])])]),t._l(t.replies,function(r){return o("li",{staticClass:"p-6 rounded shadow bg-surface-3"},[o("div",{staticClass:"flex space-x-4"},[o("div",[o("img",{staticClass:"w-8 h-8 rounded-avatar bg-surface-2",attrs:{src:r.user.avatar}})]),o("div",[o("h3",{staticClass:"font-semibold text-small text-body"},[t._v(t._s(r.user.name))]),o("p",{staticClass:"text-medium-emphasis"},[t._v(" "+t._s(r.content)+" ")])])])])})],2),o("form",{staticClass:"space-y-4",on:{submit:function(r){return r.preventDefault(),t.reply.apply(null,arguments)}}},[o("FormTextarea",{attrs:{label:t.__("Reply"),errors:t.$page.props.errors.reply},model:{value:t.form.content,callback:function(r){t.$set(t.form,"content",r)},expression:"form.content"}}),o("FormActions",[o("Button",[t._v(t._s(t.__("Save")))]),o("Button",{attrs:{type:"button",variant:"secondary"},on:{click:t.close}},[t._v(t._s(t.__("Close")))])],1)],1)])])],1)],1)],1)},S=[],I=B(F,P,S,!1,null,null,null,null);const It=I.exports;export{It as default};
