"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),c=require("@aplus-frontend/antdv"),f=require("@aplus-frontend/icon");require("../../config-provider/index.js");const a=require("../ap-copy/index.js"),h=require("../ap-image/index.js"),N=require("./constans.js"),V=require("./style/index.js"),y=require("../../config-provider/hooks/use-namespace.js"),g=e.defineComponent({name:"ApProductInfo",props:N.ApProductInfoProps(),setup(o){const{b:n,e:t,m:r}=y.useNamespace("ap-product-info"),i=V.default("ap-product-info"),d=e.useSlots(),u=l=>typeof l.value=="function"?l.value():l.helpMessage?e.h(c.Space.Compact,{},[e.h(a.ApCopy,{text:l.value,link:l.link,textStyle:l.link?"link":"minor"}),e.h(c.Tooltip,{placement:"top",color:l.toolTipBgColor,title:typeof l.helpMessage=="string"?l.helpMessage:e.h(l.helpMessage)},()=>e.h(f.IconApAdFillWarn,{color:"#FFA940",style:{cursor:"pointer"}}))]):e.h(a.ApCopy,{text:l.value,textStyle:l.link?"link":"minor",link:l.link,disableCopy:o.disableCopy},l.value);return()=>e.createVNode("div",{class:[n(),i.value]},[o.showImg&&e.createVNode("div",{class:t("img")},[e.createVNode(h.ApImage,{src:o.imgSrc,width:44,height:44,preview:o.preview},null)]),e.createVNode("div",{class:[t("content")]},[e.createVNode("div",{class:t("wrap-title")},[e.createVNode("div",{class:t("title")},[e.createVNode(a.ApCopy,{disableCopy:o.disableCopy},{default:()=>[o.title]})]),e.createVNode("div",{class:t("title-suffix")},[d["title-suffix"]?.()])]),e.createVNode("div",{class:t("row-container")},[o.values.map((l,p)=>{const s=l.col===2,v=l.col!==2&&p%2===0;return e.createVNode("div",{key:JSON.stringify(l),class:[t("row-item"),r(s?"full":"half")]},[e.createVNode("div",{class:[t("item")]},[l.label&&e.createVNode("div",{class:t("label")},[l.label,e.createVNode("span",null,[e.createTextVNode(":")])]),e.createVNode("div",{class:[t("value"),!s&&r("overflow")],title:typeof l.value!="function"?String(l.value||""):""},[u(l)])]),v&&e.createVNode("div",{class:t("divider"),style:{right:0}},[e.createVNode("div",{class:t("divider-vertical")},null)])])})])])])}});exports.default=g;
