"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var core=require("@gem-sdk/core"),helpers=require("../../../helpers.js"),Text_liquid=require("../../../text/components/Text.liquid.js"),system=require("@gem-sdk/system"),helpers$1=require("./common/helpers.js");const ProductTitle=e=>{let{setting:t,builderProps:r}=e,s=`<p>${helpers.getStaticLocale("ProductTitle","product_not_found")}</p>`,l=()=>Text_liquid.default(helpers$1.getTextProps(e)),i=system.createAttr({href:"{{ product.url }}",title:"{{ product.title }}"}),o=t?.linkProduct,c=system.createClass({"gp-product-title-link-wrapper":!0}),p=system.createStateOrContext({setting:{linkProduct:t?.linkProduct},uid:r?.uid}),u=()=>{let e=core.isLocalEnv?"{{ 'gp-product-title-v7-5.js' | asset_url }}":`${core.baseAssetURL}/assets-v2/gp-product-title-v7-5.js?v={{ shop.metafields.GEMPAGES.ASSETS_VERSION }}`;return`<script ${helpers.getSettingPreloadData('class="gps-link" delay',"src")}="${e}" defer="defer"></script>`};return system.LiquidUnless("product",`${s}`,core.template`
      <gp-product-title
        gp-data='${core.dataStringify(p)}'
      >
        ${system.If(o,core.template`<a ${i} class="${c}">
            ${l()}
            </a>`,core.template`${l()}`)}
      </gp-product-title>
      ${u()}
    `)};exports.default=ProductTitle;
