import{s as e,ah as l,a6 as a,ax as s,ay as t}from"./vendor-element-C6D3GHVC.js";import{t as r,bG as o,r as i,E as d,x as u,u as c,F as n,B as p,O as v,v as b,I as m,L as y,K as f,bD as g}from"./vendor-core-B-NFAs71.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"},h={key:1,class:"text-3xl text-indigo-400 font-bold"},w={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"},T={key:0,class:"text-gray-400 line-through text-sm"},I={class:"flex flex-wrap gap-2"},L={key:0,class:"bg-blue-50 p-3 rounded-md border border-blue-100"},M={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"},H={class:"font-bold text-gray-800 border-l-4 border-indigo-500 pl-2"},P=["innerHTML"],A={key:2,class:"text-center text-gray-400 py-8 bg-gray-50 rounded border border-dashed border-gray-200"},B=g(r({__name:"ProductDetailDialog",setup(r,{expose:g}){const{t:B}=o(),E=i(!1),F=i({});return g({open:e=>{F.value=e,E.value=!0}}),(r,o)=>{const i=l,g=a,G=t,K=s,O=e;return u(),d(O,{modelValue:E.value,"onUpdate:modelValue":o[0]||(o[0]=e=>E.value=e),title:c(B)("supply.productDetail"),width:"600px","destroy-on-close":"","append-to-body":""},{default:n(()=>{var e;return[p("div",x,[p("div",_,[p("div",k,[F.value.cover_image?(u(),d(i,{key:0,src:F.value.cover_image,class:"w-full h-full object-cover","preview-src-list":[F.value.cover_image],fit:"cover"},null,8,["src","preview-src-list"])):(u(),b("div",h,y(null==(e=F.value.name)?void 0:e.charAt(0)),1))]),p("div",w,[p("div",D,y(F.value.name),1),p("div",j,[p("span",z,"¥"+y(F.value.price),1),Number(F.value.market_price)>0&&Number(F.value.market_price)>Number(F.value.price)?(u(),b("span",T,"¥"+y(F.value.market_price),1)):m("",!0)]),p("div",I,[v(g,{size:"small",effect:"plain",type:"info"},{default:n(()=>[f("ID: "+y(F.value.id),1)]),_:1}),v(g,{size:"small",type:F.value.stock>0?"success":"danger",effect:"light"},{default:n(()=>{var e;return[f(y(c(B)("supply.stock"))+": "+y(null!=(e=F.value.stock)?e:0),1)]}),_:1},8,["type"]),F.value.docking_type>0||F.value.source_product_id&&F.value.source_product_id>0?(u(),d(g,{key:0,size:"small",type:"warning",effect:"light"},{default:n(()=>[f(y(c(B)("supply.dockingProduct")),1)]),_:1})):m("",!0)])])]),v(K,{column:2,border:"",size:"small",class:"w-full"},{default:n(()=>[v(G,{label:c(B)("common.createTime")||c(B)("supply.applyTime")},{default:n(()=>[f(y(F.value.create_time),1)]),_:1},8,["label"]),v(G,{label:c(B)("supply.deliveryMode")},{default:n(()=>[f(y(c(B)("supply.autoDelivery")),1)]),_:1},8,["label"])]),_:1}),F.value.instruction?(u(),b("div",L,[p("div",M,y(c(B)("supply.instruction")),1),p("div",N,y(F.value.instruction),1)])):m("",!0),F.value.description?(u(),b("div",V,[p("div",H,y(c(B)("supply.productDetail")),1),p("div",{class:"bg-gray-50 p-4 rounded border border-gray-100 text-sm leading-relaxed break-words description-content",innerHTML:F.value.description},null,8,P)])):m("",!0),F.value.description||F.value.instruction?m("",!0):(u(),b("div",A,y(c(B)("supply.noDescription")),1))])]}),_:1},8,["modelValue","title"])}}}),[["__scopeId","data-v-331b96d1"]]);export{B as default};
