/* COPYRIGHT Esri - https://js.arcgis.com/1.2/LICENSE.txt */
import{a as t}from"./RQFHSMWM.js";import"./TBHFGSW5.js";import"./YPYVBSI2.js";import"./7ETQT3G4.js";import"./QNRKUIIZ.js";import"./GQCZRU3J.js";import{a as r}from"./REIYPTAV.js";import"./2OU4FEWW.js";import"./VV7FJXQ5.js";import"./DSY5AB5O.js";import"./GN3QLDHM.js";import"./44A5XEM4.js";import"./TTLT7RGV.js";import"./ZMQIXHQT.js";import"./ON4BNIHV.js";import"./7HFNWEO7.js";import"./U3ZSY3PW.js";import"./S63WKB2G.js";import"./CWR7ZYKZ.js";import"./2WOAXFRU.js";import"./5WGXAZJH.js";import"./S2YYP65L.js";import"./TS3CE2TS.js";import"./3QPJ2JCA.js";var n=async(e,l,o)=>{let i=r(new Date,l.timeZone);return{type:"Layout",elements:[{labelKey:`${e}.fields.name.label`,scope:"/properties/name",type:"Control",options:{messages:[{type:"ERROR",keyword:"required",icon:!0,labelKey:`${e}.fields.name.requiredError`},{type:"ERROR",keyword:"maxLength",icon:!0,labelKey:"shared.fields.title.maxLengthError"}]}},{labelKey:`${e}.fields.date.label`,scope:"/properties/startDate",type:"Control",options:{control:"hub-field-input-date",min:i,messages:[{type:"ERROR",keyword:"required",icon:!0,labelKey:`${e}.fields.date.requiredError`},{type:"ERROR",keyword:"formatMinimum",icon:!0,labelKey:`${e}.fields.date.minDateError`}]}},{labelKey:`${e}.fields.allDay.label`,type:"Control",scope:"/properties/isAllDay",options:{control:"hub-field-input-switch"}},{labelKey:`${e}.fields.startTime.label`,scope:"/properties/startTime",type:"Control",rule:{condition:{scope:"/properties/isAllDay",schema:{const:!1}},effect:t.SHOW},options:{control:"hub-field-input-time",messages:[{type:"ERROR",keyword:"required",icon:!0,labelKey:`${e}.fields.startTime.requiredError`}]}},{labelKey:`${e}.fields.endTime.label`,scope:"/properties/endTime",type:"Control",rule:{condition:{scope:"/properties/isAllDay",schema:{const:!1}},effect:t.SHOW},options:{control:"hub-field-input-time",messages:[{type:"ERROR",keyword:"required",icon:!0,labelKey:`${e}.fields.endTime.requiredError`},{type:"ERROR",keyword:"formatExclusiveMinimum",icon:!0,labelKey:`${e}.fields.endTime.minTimeError`}]}}]}};export{n as buildUiSchema};
