'use client';
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react/jsx-runtime"),t=require("@gem-sdk/core"),r=require("../../../text/components/Text.js"),l=require("react");exports.default=({setting:s,builderProps:u,styles:d})=>{let o=t.useProduct(),n=t.useEditorMode(),[i,a]=l.useState(null),c=s?.label&&s.label.trim().length>0?`${s.label} ${o?.vendor??""}`:`${o?.vendor??""}`;return l.useEffect(()=>{let e=localStorage.getItem("shopifyDomain");e&&a(e)},[]),e.jsx("div",{id:`vendor-${u?.uid}`,children:o?s?.url&&"edit"!==n?e.jsx("a",{href:`//${i}/collections/vendors?q=${o.vendor}`,target:`${"new-tab"===s.openIn?"_blank":"_self"}`,children:e.jsx(r.default,{builderProps:u,styles:d,setting:{...s,text:c,excludeFlex:!0}})}):e.jsx(r.default,{builderProps:u,styles:d,setting:{...s,text:c,excludeFlex:!0}}):null})};
