1import{M as g,e as i,h,c as k,o as O,a as o,j as s,i as n,u,Y as C,w as m,A as p,R as V,C as B,a0 as j}from"./bogGBgDk.js";import{O as N}from"./DZ4Xf8mp.js";const R={class:"border border-gray-100 rounded-lg shadow-sm bg-white"},F={class:"p-8 text-center"},A={class:"text-secondary"},K=["href"],M={class:"md:mx-auto md:w-1/2 mt-4"},T={class:"md:flex md:items-center md:space-x-3 md:justify-center mt-6"},Y={class:"mt-5 md:mt-0"},I={__name:"cancel",props:{order:{type:Object,required:!0}},setup(r){const f=j(),l=g(),d=r,a=i(!1),_=async()=>{await l.back()},t=i(""),v=async()=>{a.value=!0;try{await N.cancelOrder(d.order.order_number,t.value),await l.push("/orders"),f.success("Order #"+d.order.order_number+" cancelled")}catch(c){console.log(c)}finally{a.value=!1}};return(c,e)=>{const x=h("FormKit"),b=V,y=B;return O(),k("div",R,[o("div",F,[e[6]||(e[6]=o("h2",{class:"font-bold mb-2"},"Are you sure you want to cancel this order?",-1)),o("p",A,[e[1]||(e[1]=o("span",{class:"font-bold"},"You will not be refunded automatically.",-1)),e[2]||(e[2]=s(" For a refund, please ",-1)),o("a",{href:"mailto:"+r.order.order_form.seller_profile.contact_email+"?subject=Order%20#"+r.order.order_number,class:"text-primary"},"contact the seller",8,K),e[3]||(e[3]=s(".",-1))]),o("div",M,[n(x,{type:"textarea",modelValue:u(t),"onUpdate:modelValue":e[0]||(e[0]=w=>C(t)?t.value=w:null),label:"Reason for cancellation",help:"(optional)",placeholder:"Please provide a reason for cancellation"},null,8,["modelValue"])]),o("div",T,[o("div",null,[n(b,{onClick:p(v,["prevent"]),loading:u(a)},{default:m(()=>[...e[4]||(e[4]=[s("Cancel Order",-1)])]),_:1},8,["loading"])]),o("div",Y,[n(y,{to:"#",onClick:p(_,["prevent"]),class:"text-sm text-secondary d-block"},{default:m(()=>[...e[5]||(e[5]=[s("I've changed my mind",-1)])]),_:1})])])])])}}};export{I 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.