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

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