"use strict";var helpers=require("../../common/helpers.js");const SettingUIV2=[{label:"Estimate days",help:{content:"Count from the day buyer visit the page"},controls:[{label:"Type",setting:{id:"typeEstimate"}},{label:"Min estimate",setting:{id:"minEstimate"},conditionDisplay:`typeEstimate === "${helpers.ESTIMATE_DAYS.RANGE}"`,controlChangeTrigger:{settings:[{condition:"parseInt(minEstimate) > parseInt(maxEstimate)",source:["maxEstimate","minEstimate"],action:{controlId:"maxEstimate",groupType:"setting",controlType:"setting",valueFromField:"minEstimate"}}],options:{noRecordHistory:!0}}},{label:"Max estimate",setting:{id:"maxEstimate"},conditionDisplay:`typeEstimate === "${helpers.ESTIMATE_DAYS.RANGE}"`,controlChangeTrigger:{settings:[{condition:"parseInt(maxEstimate) < parseInt(minEstimate)",source:["maxEstimate","minEstimate"],action:{controlId:"minEstimate",groupType:"setting",controlType:"setting",valueFromField:"maxEstimate"}}],options:{noRecordHistory:!0}}},{label:"Estimate",setting:{id:"estimateTime"},conditionDisplay:`typeEstimate === "${helpers.ESTIMATE_DAYS.SPECIFIC}"`}]},{label:"Date format",help:{content:"Precise date is displayed based on buyer time zone"},controls:[{label:"Format",setting:{id:"typeFormat"}},{conditionDisplay:"typeFormat === 'Custom'",label:"Custom format",setting:{id:"customFormat"}},{layout:"vertical",controlConfig:{id:"moreFormat",type:"banner",message:"You can follow Shopify’s date format",link:{label:"here",url:"https://www.shopify.com/partners/blog/liquid-date-format"},closable:!0},conditionDisplay:"typeFormat === 'Custom'"}]},{label:"Date text",controls:[{setting:{id:"typoDate"},layout:"vertical"}]},{controls:[{label:"Custom text",setting:{id:"enableCustomText"},options:{labelVariant:"primary",toggleStyle:"switch"}},{type:"combo",label:"Content",iconName:"polaris-text-block",fixedValue:"Estimate delivery between",getValueFromSettingID:"customText",isHideClear:!0,compoDefaultValue:"Estimate delivery between",conditionDisplay:"enableCustomText === true",controls:[{label:"Content",layout:"vertical",setting:{id:"customText"}}]},{conditionDisplay:"enableCustomText === true",setting:{id:"typoCustom"},layout:"vertical"}]},{label:"Size",controls:[{id:"Width",label:"Width",controlConfig:{id:"width",type:"dropdown:input",label:"Width",inputType:"number",units:["px","%"],hideUnit:!1,fallbackValue:"Auto",linkWithSetting:{name:"globalSize",field:"width"},displayOptions:[{label:"Fit content",value:"Auto",showValue:!0},{label:"Full",value:"100%",showValue:!0}]},layout:"horizontal"},{label:"Padding",controlConfig:{id:"padding",type:"padding-v2",linkWithSetting:{name:"globalSize",field:"padding"},compoDefaultValue:{desktop:{default:{type:"medium",top:"4px",bottom:"4px",left:"16px",right:"16px"}}}}}]},{label:"Background",controls:[{setting:{id:"background"},layout:"vertical"}]},{label:"Display condition",controls:[{label:"If out of stock",setting:{id:"ifOutOfStock"},options:{onlyShowInTags:["Product"]}}]},{label:"Shape",conditionDisplay:'pageType != "POST_PURCHASE"',controls:[{label:"Border",setting:{id:"shapeBorder"}},{label:"Corner",setting:{id:"shapeRounded"}},{label:"Shadow",setting:{id:"shapeBoxShadow"}}]},{controls:[{label:"Align",conditionEnable:'!(parseInt(globalSize.width) >= 100 && globalSize.width?.includes("%"))',setting:{id:"align"},options:{labelVariant:"primary",fullWidth:!0,disableMessage:"Horizontal alignment is disabled when the width is set to 100% or greater"}}]}];exports.SettingUIV2=SettingUIV2;
