"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("@gem-sdk/core"),t=require("./property-choice/ProductPropertyChoice.liquid.js"),r=require("./property-input/ProductPropertyInput.liquid.js"),s=require("./property-select/ProductPropertySelect.liquid.js"),l=require("../../../helpers.js"),a=require("@gem-sdk/system"),p=require("./common/helpers.js"),o=require("./common/attrs.js"),d=require("./common/styles.js"),i=require("./common/classes.js");exports.default=({setting:c,styles:n,builderProps:g,advanced:u,pageContext:y})=>{let{name:C,type:$,childItem:m}=c??{},{isDisplayLabel:v=!0}=n??{};c&&!C&&(c.name="Property");let f=g?.uid,{displayLabel:h}=p.getContents({uniqId:f,pageContext:y??{},setting:c}),S=a.createAttr({...o.getWrapperLiquidAttrs({uniqId:f,pageContext:y??{},setting:c})}),q=a.createStyle({...d.getWrapperStyles(n)}),j=a.createStyle({...d.getLabelStyles(n)}),P=a.createClass({...i.getLabelClasses(n)}),b=a.createClass({...i.getLiquidTagClasses(c)}),x=a.createClass({...i.getLabelWrapperClasses(u)}),L=a.createStyle({...d.getLabelContentStyles()}),E=p.getLabelContent(c),M=a.createClass({...i.getWrapperErrorMessageClasses(),...e.composeClasses("data-[hidden=true]:gp-hidden")}),w=a.createStyle({...d.getWrapperErrorMessageStyles(n)}),A=a.createAttr({...o.getWrapperErrorMessageAttrs()});return e.template`
    <gp-product-property ${{...S}} class="${b}"
      style="${q}"
    >
      ${e.RenderIf(v,e.template`<div class="${x}">
        <label htmlFor="${f}-${C}" class="${P}" style="${j}">
          ${h}
          <span style="${L}">${E}</span>
        </label>
      </div>`)}

      <div>
        ${e.RenderIf("dropdown"===$,s.default({setting:c,styles:n,builderProps:g,pageContext:y}))}
        ${e.RenderIf("checkbox"===$||"radio"===$,t.default({setting:{...c,childItem:m,name:C},styles:n,builderProps:g,pageContext:y}))}
        ${e.RenderIf("text"===$||"textarea"===$||"email"===$||"hidden"===$,r.default({setting:c,styles:n,builderProps:g,pageContext:y}))}
        <div
          ${{...A}}
          class="${M}"
          style="${w}"
        >
          <svg
            width="16"
            height="16"
            viewBox="0 0 16 16"
            fill="currentColor"
            xmlns="http://www.w3.org/2000/svg"
          >
            <path
              fill-rule="evenodd"
              clip-rule="evenodd"
              d="M15 8C15 11.866 11.866 15 8 15C4.13401 15 1 11.866 1 8C1 4.13401 4.13401 1 8 1C11.866 1 15 4.13401 15 8ZM8 10.5C7.58579 10.5 7.25 10.8358 7.25 11.25C7.25 11.6642 7.58579 12 8 12C8.41421 12 8.75 11.6642 8.75 11.25C8.75 10.8358 8.41421 10.5 8 10.5ZM8.5 4C8.5 3.72386 8.27614 3.5 8 3.5C7.72386 3.5 7.5 3.72386 7.5 4V9C7.5 9.27614 7.72386 9.5 8 9.5C8.27614 9.5 8.5 9.27614 8.5 9V4Z"
              fill="currentColor"
            ></path>
          </svg>
          <span data-slot-type="message-content" class="gp-pl-1"></span>
        </div>
      </div>
    </gp-product-property>
    ${e.RenderIf(e.isLocalEnv,`<script ${l.getSettingPreloadData('class="gps-link" delay',"src")}="{{ 'gp-product-property-v7-5.js' | asset_url }}" defer="defer"></script>`,`<script ${l.getSettingPreloadData('class="gps-link" delay',"src")}="${e.baseAssetURL}/assets-v2/gp-product-property-v7-5.js?v={{ shop.metafields.GEMPAGES.ASSETS_VERSION }}" defer="defer"></script>`)}`};
