import{_ as e,l,Y as a,Z as s,X as t}from"./vendor-element-DupX9wXy.js";import{q as r,bI as o,r as i,D as d,v as u,E as c,A as n,M as p,t as v,H as b,K as m,J as f,u as y,bE as g}from"./vendor-core-Di0OO4oJ.js";const x={class:"flex flex-col gap-6 max-h-[70vh] overflow-y-auto pr-2"},_={class:"flex gap-4 items-start"},k={class:"w-32 h-32 flex-shrink-0 bg-indigo-50 rounded-lg overflow-hidden flex items-center justify-center border border-indigo-100"},w={key:1,class:"text-3xl text-indigo-400 font-bold"},h={class:"flex-1 min-w-0 py-1"},D={class:"text-lg font-bold leading-snug mb-2 break-words"},j={class:"flex items-baseline gap-2 mb-3"},z={class:"text-red-600 font-bold text-2xl"},M={key:0,class:"text-gray-400 line-through text-sm"},T={class:"flex flex-wrap gap-2"},H={key:0,class:"bg-blue-50 p-3 rounded-md border border-blue-100"},I={class:"font-bold text-blue-700 text-sm mb-1"},N={class:"text-sm text-blue-900 whitespace-pre-wrap leading-relaxed"},V={key:1,class:"space-y-2"},A={class:"font-bold text-gray-800 border-l-4 border-indigo-500 pl-2"},E=["innerHTML"],L={key:2,class:"text-center text-gray-400 py-8 bg-gray-50 rounded border border-dashed border-gray-200"},P=g(r({__name:"ProductDetailDialog",setup(r,{expose:g}){const{t:P}=o(),q=i(!1),J=i({});return g({open:e=>{J.value=e,q.value=!0}}),(r,o)=>{const i=e,g=l,K=s,U=a,X=t;return u(),d(X,{modelValue:q.value,"onUpdate:modelValue":o[0]||(o[0]=e=>q.value=e),title:y(P)("supply.productDetail"),width:"600px","destroy-on-close":"","append-to-body":""},{default:c(()=>{var e;return[n("div",x,[n("div",_,[n("div",k,[J.value.cover_image?(u(),d(i,{key:0,src:J.value.cover_image,class:"w-full h-full object-cover","preview-src-list":[J.value.cover_image],fit:"cover"},null,8,["src","preview-src-list"])):(u(),v("div",w,m(null==(e=J.value.name)?void 0:e.charAt(0)),1))]),n("div",h,[n("div",D,m(J.value.name),1),n("div",j,[n("span",z,"¥"+m(J.value.price),1),Number(J.value.market_price)>0&&Number(J.value.market_price)>Number(J.value.price)?(u(),v("span",M,"¥"+m(J.value.market_price),1)):b("",!0)]),n("div",T,[p(g,{size:"small",effect:"plain",type:"info"},{default:c(()=>[f("ID: "+m(J.value.id),1)]),_:1}),p(g,{size:"small",type:J.value.stock>0?"success":"danger",effect:"light"},{default:c(()=>{var e;return[f(m(y(P)("supply.stock"))+": "+m(null!=(e=J.value.stock)?e:0),1)]}),_:1},8,["type"]),J.value.docking_type>0||J.value.source_product_id&&J.value.source_product_id>0?(u(),d(g,{key:0,size:"small",type:"warning",effect:"light"},{default:c(()=>[f(m(y(P)("supply.dockingProduct")),1)]),_:1})):b("",!0)])])]),p(U,{column:2,border:"",size:"small",class:"w-full"},{default:c(()=>[p(K,{label:y(P)("common.createTime")||y(P)("supply.applyTime")},{default:c(()=>[f(m(J.value.create_time),1)]),_:1},8,["label"]),p(K,{label:y(P)("supply.deliveryMode")},{default:c(()=>[f(m((J.value,P("supply.autoDelivery"))),1)]),_:1},8,["label"])]),_:1}),J.value.instruction?(u(),v("div",H,[n("div",I,m(y(P)("supply.instruction")),1),n("div",N,m(J.value.instruction),1)])):b("",!0),J.value.description?(u(),v("div",V,[n("div",A,m(y(P)("supply.productDetail")),1),n("div",{class:"bg-gray-50 p-4 rounded border border-gray-100 text-sm leading-relaxed break-words description-content",innerHTML:J.value.description},null,8,E)])):b("",!0),J.value.description||J.value.instruction?b("",!0):(u(),v("div",L,m(y(P)("supply.noDescription")),1))])]}),_:1},8,["modelValue","title"])}}}),[["__scopeId","data-v-b1cc4db4"]]);export{P as default};
