import{ESTIMATE_DAYS as t}from"../../common/helpers.js";let SettingUIV2=[{label:{en:"Estimate days"},help:{content:"Count from the day buyer visit the page"},controls:[{label:{en:"Type"},setting:{id:"typeEstimate"}},{label:{en:"Min estimate"},setting:{id:"minEstimate"},conditionDisplay:`typeEstimate === "${t.RANGE}"`,controlChangeTrigger:{settings:[{condition:"parseInt(minEstimate) > parseInt(maxEstimate)",source:["maxEstimate","minEstimate"],action:{controlId:"maxEstimate",groupType:"setting",controlType:"setting",valueFromField:"minEstimate"}}],options:{noRecordHistory:!0}}},{label:{en:"Max estimate"},setting:{id:"maxEstimate"},conditionDisplay:`typeEstimate === "${t.RANGE}"`,controlChangeTrigger:{settings:[{condition:"parseInt(maxEstimate) < parseInt(minEstimate)",source:["maxEstimate","minEstimate"],action:{controlId:"minEstimate",groupType:"setting",controlType:"setting",valueFromField:"maxEstimate"}}],options:{noRecordHistory:!0}}},{label:{en:"Estimate"},setting:{id:"estimateTime"},conditionDisplay:`typeEstimate === "${t.SPECIFIC}"`}]},{label:{en:"Date format"},help:{content:"Precise date is displayed based on buyer time zone"},controls:[{label:{en:"Format"},setting:{id:"typeFormat"}},{conditionDisplay:"typeFormat === 'Custom'",label:{en:"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:{en:"Date text"},controls:[{setting:{id:"typoDate"},layout:"vertical"}]},{controls:[{label:{en:"Custom text"},setting:{id:"enableCustomText"},options:{labelVariant:"primary",toggleStyle:"switch"}},{type:"combo",label:{en:"Content"},iconName:"polaris-text-block",fixedValue:"Estimate delivery between",getValueFromSettingID:"customText",isHideClear:!0,compoDefaultValue:"Estimate delivery between",conditionDisplay:"enableCustomText === true",controls:[{label:{en:"Content"},layout:"vertical",setting:{id:"customText"}}]},{conditionDisplay:"enableCustomText === true",setting:{id:"typoCustom"},layout:"vertical"}]},{label:{en:"Size"},controls:[{id:"Width",label:{en:"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:{en:"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:{en:"Background"},controls:[{setting:{id:"background"},layout:"vertical"}]},{label:{en:"Display condition"},controls:[{label:{en:"If out of stock"},setting:{id:"ifOutOfStock"},options:{onlyShowInTags:["Product"]}}]},{label:{en:"Shape",cn:"形状",es:"Forma"},conditionDisplay:'pageType != "POST_PURCHASE"',controls:[{label:{en:"Border",cn:"边界",es:"Borde"},setting:{id:"shapeBorder"}},{label:{en:"Corner",cn:"角落",es:"Esquina"},setting:{id:"shapeRounded"}},{label:{en:"Shadow",cn:"阴影",es:"Sombra"},setting:{id:"shapeBoxShadow"}}]},{controls:[{label:{en:"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"}}]}];export{SettingUIV2};
