"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("@gem-sdk/core"),s=require("../../../helpers.js"),t=require("@gem-sdk/system"),r=require("./common/classes.js"),a=require("./common/style.js"),l=require("./common/attr.js"),i=require("./common/helpers.js");exports.default=({setting:c,styles:o,builderProps:v,pageContext:n})=>{let d=t.createClass(r.createLayoutClasses(c,v?.uid)),y=t.createStyle({...i.removeHoverStyles(a.createLayoutStyles(c,o),o?.enableHoverEffect)}),p=t.createClass(r.createTypoClasses(o)),u=t.createStyle({...i.removeHoverStyles(a.createTypoStyles(o),o?.enableHoverEffect)}),C=t.createClass(r.createPreviewClasses()),f=t.createClass(r.createPreviewItemClasses()),S=t.createClass(r.createPreviewRemoveClasses()),m=t.createClass(r.createMessageClasses()),$=t.createStyle(a.createMessageStyles()),g=t.createClass(r.createContentWidthClasses()),H=t.createClass(r.createInputClasses()),b=t.createClass(r.composeClasses("gp-flex gp-items-center")),q=t.createAttr({...l.getInputAttr(c?.isRequired,c?.numberOfFiles)}),I=t.createStyle({...i.removeHoverStyles(a.createContainerStyles(o?.align,o?.textColor),o?.enableHoverEffect)}),j=t.createStyle({...i.removeHoverStyles(a.createWrapContentWidthStyles(c),o?.enableHoverEffect)}),E=t.createClass(r.createWrapContainerClasses(v?.uid)),P=t.createStyle({...i.removeHoverStyles(a.createContentWithStyles(c,o),o?.enableHoverEffect)}),h=t.createStyle({...i.removeHoverStyles(a.createIconContainerStyles(c),o?.enableHoverEffect)}),w=t.createClass(r.createIconContentClasses()),x=t.createStyle({...i.removeHoverStyles(a.createIconContentStyles(c,o),o?.enableHoverEffect)}),O=i.getDisplayText("Liquid",{uid:v?.uid,setting:c,styles:o,pageContext:n}),R=t.createStateOrContext({settings:{isShowPreviewImage:c?.isShowPreviewImage,numberOfFiles:c?.numberOfFiles,isRequired:c?.isRequired}});return e.template`
  <gp-file-upload
    gp-data='${JSON.stringify(R)}'
  >
  <div class="${E}" style="${I}">
    <input ${q} class="${H}">
    <div class="${b}" style="${j}">
      <div class="${g}" style="${P}">
        <div class="${d}" style="${y}">
      ${t.If(!!(c?.iconSvg&&c?.iconVisible),e.template`
            <div class='${b}' style="${h}">
              <div class="${w}" style="${x}">
                ${c?.iconSvg}
              </div>
            </div>
          `)}
          <div class="${p}" style="${u}">
            ${O}
          </div>
        </div>
      </div>
    </div>
  </div>
  <div class="${C}">
    <div class="${f}">
    <div class="${S}"></div>
    </div>
  </div>
  <div class="${m}" style="${$}"></div>
  </gp-file-upload>

  ${e.RenderIf(e.isLocalEnv,`<script ${s.getSettingPreloadData('class="gps-link" delay',"src")}="{{ 'gp-file-upload-v7-5.js' | asset_url }}" defer="defer"></script>`,`<script ${s.getSettingPreloadData('class="gps-link" delay',"src")}="${e.baseAssetURL}/assets-v2/gp-file-upload-v7-5.js" defer="defer"></script>`)}
  `};
