import{t as k,w as x}from"./elementPlus.CSBdF9Zt.js";import{h as b}from"./useCopyText.ByA_uH9s.js";import{d as w,ai as s,o,c,J as n,U as e,O as l,M as C,a as i,S as u,T as d,u as r,R as v,I as $}from"./vue.1RczIYhx.js";const B={class:"flex justify-start items-center font-medium"},z={class:"image-slot"},N={class:"text-left"},T={class:"flex"},W={class:"font-semibold italic ml-1",style:{color:"#1d2129"}},I={key:0},S={class:"m-0 p-0 line-clamp-1 text-ellipsis"},U=w({__name:"ProductInfo",props:{item:{type:Object,required:!0},imgWidth:{type:Number,default:30},showTitleTooltip:{type:Boolean,default:!1},displaySKU:{type:Boolean,default:!1},displayCompetitor:{type:Boolean,default:!1}},setup(t){return(_,a)=>{const m=s("el-image"),f=s("el-tooltip"),h=s("el-icon"),g=s("el-link"),y=s("el-button"),p=s("el-tag");return o(),c("div",B,[t.item.img?(o(),c("div",{key:0,style:n(`width: ${t.imgWidth}px; height: ${t.imgWidth}px; margin-right: 5px;`)},[e(f,{effect:"light",placement:"right-start"},{content:l(()=>[e(m,{src:`https://d1ge0kk1l5kms0.cloudfront.net/images/I/${t.item.img}.jpg`,style:{width:"250px"}},null,8,["src"])]),default:l(()=>[e(m,{src:`https://d1ge0kk1l5kms0.cloudfront.net/images/I/${t.item.img}.jpg`,style:n(`width: ${t.imgWidth}px; height: ${t.imgWidth}px; margin-right: 5px;`),fit:"scale-down",lazy:""},null,8,["src","style"])]),_:1})],4)):(o(),C(m,{key:1,style:n(`min-width: ${t.imgWidth}px; margin-right: 5px; font-size: 2.7rem;`),lazy:""},{error:l(()=>[i("div",z,[e(h,null,{default:l(()=>[e(r(x))]),_:1})])]),_:1},8,["style"])),i("div",N,[e(f,{content:t.item.title,disabled:t.showTitleTooltip||!t.item.title,effect:"dark",placement:"top-start","show-after":"350"},{default:l(()=>[e(g,{disabled:!t.item.title,href:t.item.url,underline:!1,target:"_blank",type:"primary"},{default:l(()=>[i("span",{class:$(t.item.is_competitors&&t.displayCompetitor?"line-clamp-1":"line-clamp-2 text-ellipsis whitespace-normal")},d(t.item.title||"--"),3)]),_:1},8,["disabled","href"])]),_:1},8,["content","disabled"]),i("div",null,[i("div",T,[a[1]||(a[1]=u(" ASIN: ")),i("span",W,d(t.item.asin||"--"),1),e(y,{disabled:!t.item.asin,icon:r(k),class:"ml-1 cursor-pointer",link:"",onClick:a[0]||(a[0]=j=>r(b)(t.item.asin||""))},null,8,["disabled","icon"])]),t.item.is_competitors&&t.displayCompetitor?(o(),c("div",I,[i("p",S,[i("span",{style:n(t.item.is_competitors?"color: #F77D7C;":"")},[e(p,{effect:"plain",size:"small",type:"danger"},{default:l(()=>[u(d(t.item.is_competitors?"竞品":"否"),1)]),_:1})],4)])])):v("",!0)])])])}}});export{U as _};
