import{e as V,i as m,c as w,o as a,w as r,a as e,b as i,k as u,g as p,t as o,F as g,l as h,n as $,h as T}from"./vendor-1-1-29.js";import{_ as j}from"./MdrModal-1-1-29.js";const B={class:"flex flex-col gap-6 px-4"},C={class:"flex justify-between items-center px-4 py-2 bg-primary-200 text-primary-800 rounded-lg"},S=["src"],N=["href"],z={key:1,class:"text-xs"},E={class:"flex items-center gap-4"},q={class:"border border-gray-200 rounded-lg"},F=["src"],K={class:"flex flex-col gap-2"},A={class:"font-semibold text-xl"},D={class:"flex"},I={key:0},L={class:"flex flex-col gap-2"},M={class:"font-semibold text-lg"},O={class:"flex flex-col outline outline-1 outline-gray-200 rounded-lg"},P={class:"flex flex-col gap-1 w-2/5"},U={class:"font-semibold text-lg"},G={class:"text-primary-800 break-words w-3/5 text-right"},Q={__name:"ShipmentInfoModal",props:{modelValue:Boolean,shipment:{type:Object,required:!0}},emits:["update:modelValue"],setup(s,{emit:_}){const f=s,x=_,c=V({get(){return f.modelValue},set(n){x("update:modelValue",n)}}),y=n=>{n&&navigator.clipboard.writeText(n)},b={non_processed:"Kargo Paketlendi",shipped:"Kargoya Teslim Edildi",on_transit:"Transfer Sürecinde",in_courier:"Teslimat Sürecinde",delivered:"Teslim Edildi"};return(n,l)=>{const v=m("clipboard-icon"),k=m("time-format");return a(),w(j,{modelValue:c.value,"onUpdate:modelValue":l[1]||(l[1]=t=>c.value=t),size:"size-1/3"},{title:r(()=>[T(o(n.$t("shipment_details")),1)]),actions:r(()=>[...l[2]||(l[2]=[])]),default:r(()=>[e("div",B,[e("div",C,[e("img",{src:s.shipment.cargo_company.logo,class:"object-contan !h-6"},null,8,S),s.shipment.tracking_number?(a(),i("a",{key:0,href:s.shipment.tracking_link,target:"_blank",class:"underline text-xs"},o(s.shipment.tracking_number),9,N)):(a(),i("span",z,o(n.$t("not_yet_formed")),1)),p(v,{class:"h-6 cursor-pointer",onClick:l[0]||(l[0]=t=>y(s.shipment.tracking_number))})]),s.shipment.lines.length>0?(a(!0),i(g,{key:0},h(s.shipment.lines,t=>(a(),i("div",{key:t.id,class:"py-2 px-8 border border-gray-200 rounded-lg"},[e("div",E,[e("div",q,[e("img",{src:t.image,alt:"",srcset:"",class:"!h-16 !w-16 object-cover rounded-lg"},null,8,F)]),e("div",K,[e("span",A,o(t.title),1),e("div",D,[t.sku?(a(),i("span",I," Sku : "+o(t.platform_id)+" - ",1)):u("",!0),e("span",null,o(t.quantity)+" Adet ",1)])])])]))),128)):u("",!0),e("div",L,[e("span",M,o(n.$t("receiver_address")),1),e("span",null,o(`${s.shipment.receiver.address} ${s.shipment.receiver.district}/${s.shipment.receiver.city}`),1)]),e("div",O,[(a(!0),i(g,null,h(s.shipment.steps,(t,d)=>(a(),i("div",{key:d,class:$(`${d%2===0?"bg-white":"bg-gray-100"} flex justify-between items-center px-4 py-2`)},[e("div",P,[e("span",U,o(b[t.status]),1),p(k,{date:t.created_at},null,8,["date"])]),e("span",G,o(t.message),1)],2))),128))])])]),_:1},8,["modelValue"])}}};export{Q as _};
