import{G as b,r as C,i as D,j as w,k as m,l as t,w as l,m as n,o as p,p as N,u as d,t as a,F as k,z as B,A as f}from"./entry.b3b9f8ed.js";import{a as R}from"./axios.4a32a752.js";const A=b({id:"slips",state:()=>({slip:{},details:{}}),getters:{showSlip(e){return e.slip},getClientName(e){return e.details.clientname},getSlipDate(e){return e.details.slipdate},getDetails(e){return e.details.slipmeta},getSlipCount(e){return e.details.availability},getInstructions(e){return e.details.description}},actions:{async getSlipDetails(e,c){try{const s=await R.get(`${c}/api/slip/id/${e}`);s&&(this.slip=s.data.data,this.details=s.data.data.attributes)}catch(s){console.log(s)}}}}),M={class:"d-flex align-center flex-column"},V=a("thead",null,[a("tr",null,[a("th",{class:"text-left"},"Medicine"),a("th",{class:"text-left"},"Quantity"),a("th",{class:"text-left"},"Details")])],-1),j=a("br",null,null,-1),E=a("br",null,null,-1),$={__name:"[searchid]",setup(e){C("");const c=D(),{searchid:s}=w().params,o=A();return o.getSlipDetails(s,c.CMS_BASE_URL),(F,I)=>{const g=n("v-card-title"),_=n("v-text-field"),i=n("v-col"),u=n("v-row"),v=n("v-divider"),h=n("v-table"),x=n("v-textarea"),S=n("v-card-text"),y=n("v-card");return p(),m("div",M,[t(y,{width:"800"},{default:l(()=>[t(g,null,{default:l(()=>[N("Medical Slip")]),_:1}),t(S,null,{default:l(()=>[t(u,{justify:"end"},{default:l(()=>[t(i,{cols:"12",sm:"6"},{default:l(()=>[t(_,{label:"Date",readonly:"","model-value":d(o).getSlipDate},null,8,["model-value"])]),_:1}),t(i,{cols:"12",sm:"6"},{default:l(()=>[t(_,{label:"Usage Count",readonly:"","model-value":d(o).getSlipCount,outlined:""},null,8,["model-value"])]),_:1})]),_:1}),t(u,null,{default:l(()=>[t(i,{cols:"12"},{default:l(()=>[t(_,{label:"Client","model-value":d(o).getClientName,readonly:""},null,8,["model-value"])]),_:1}),t(v)]),_:1}),t(u,null,{default:l(()=>[t(i,null,{default:l(()=>[t(h,null,{default:l(()=>[V,a("tbody",null,[(p(!0),m(k,null,B(d(o).getDetails,r=>(p(),m("tr",{key:r.medicinename},[a("td",null,f(r.medicinename),1),a("td",null,f(r.quantity),1),a("td",null,f(r.details),1)]))),128))])]),_:1}),j,E]),_:1}),t(v)]),_:1}),t(u,null,{default:l(()=>[t(i,null,{default:l(()=>[t(x,{label:"Additional Details","model-value":d(o).getInstructions},null,8,["model-value"])]),_:1})]),_:1})]),_:1})]),_:1})])}}};export{$ as default};
