/* COPYRIGHT Esri - https://js.arcgis.com/5.0/LICENSE.txt */
import{a as m}from"./GCYLODHA.js";import{a as p}from"./TSKD22JZ.js";import"./XJPOVJV7.js";import"./LDNQ56OK.js";import"./3HUY3T5F.js";import"./Z6G5PBUQ.js";import{a,b as n}from"./BJQOXAOG.js";import"./ASTWNDH6.js";import"./J3QMHA2M.js";import"./TKZAMPEI.js";import{a as r}from"./3G4RHRXD.js";import{a as s}from"./F7KJCNKP.js";import"./2IHQU2FX.js";import"./CGLFPVBM.js";import"./OEJAW72H.js";import"./5JJMGPOW.js";import"./TYX345MZ.js";import{a as i}from"./OCJK42MK.js";import"./MBISQ27L.js";import"./XYWNICC6.js";import"./T5HS6V2W.js";import"./UKRALD6X.js";import"./LNLMLBWQ.js";import"./P5YTFAF2.js";import"./YM3BZKEU.js";import"./35D5FZVV.js";import"./HQK5RHHT.js";import"./ZQ37ZZNF.js";import"./5UWT66A7.js";import"./SFG2REQW.js";import"./CUJCDLHI.js";import"./VU3T4WSA.js";import"./W4UTR6WU.js";import"./SE7GHLP3.js";import"./EQUAUHBX.js";import"./YEY4KEHA.js";import"./X5H73PHG.js";import"./OCUMDT2M.js";import"./TUP3HPO4.js";import"./WKMAPRRW.js";import"./OR4HXHSY.js";var g=async(e,t,l)=>{var o;return{type:"Layout",elements:[{type:"Section",labelKey:`${e}.sections.basicInfo.label`,options:{helperText:{labelKey:`${e}.sections.basicInfo.helperText`}},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:`${e}.fields.name.maxLengthError`},{type:"ERROR",keyword:"format",icon:!0,labelKey:`${e}.fields.name.entityTitleValidatorError`}]}},{labelKey:`${e}.fields.summary.label`,scope:"/properties/summary",type:"Control",options:{control:"hub-field-input-input",type:"textarea",rows:4,messages:[{type:"ERROR",keyword:"maxLength",icon:!0,labelKey:"shared.fields.purpose.maxLengthError"}]}},...p(e,t.thumbnail,t.thumbnailUrl,"initiative",l.requestOptions),{type:"Section",labelKey:`${e}.sections.description.label`,options:{section:"block"},elements:[{labelKey:`${e}.fields.description.label`,scope:"/properties/description",type:"Control",options:{control:"hub-field-input-rich-text",type:"textarea"}}]},{type:"Section",labelKey:`${e}.sections.discoverability.label`,options:{section:"block",helperText:{labelKey:`${e}.sections.discoverability.helperText`}},elements:[{labelKey:`${e}.fields.tags.label`,scope:"/properties/tags",type:"Control",options:{control:"hub-field-input-combobox",items:await s(t.tags,l.portal.id,l.hubRequestOptions),allowCustomValues:!0,selectionMode:"multiple",placeholderIcon:"label"}},...await r(e,l)]}]},{type:"Section",labelKey:`${e}.sections.location.label`,elements:[{scope:"/properties/location",type:"Control",options:{control:"hub-field-input-location-picker",extent:await a(t.location,l.hubRequestOptions),options:await n(t.id,t.type,t.location,l.portal.name,l.hubRequestOptions),noticeTitleElementAriaLevel:3}}]},{type:"Section",labelKey:`${e}.sections.status.label`,elements:[{scope:"/properties/status",type:"Control",labelKey:`${e}.fields.status.label`,options:{control:"hub-field-input-select",enum:{i18nScope:`${e}.fields.status.enum`}}},{type:"Section",labelKey:`${e}.sections.timeline.label`,options:{section:"block",helperText:{labelKey:`${e}.sections.timeline.helperText`}},elements:[{scope:"/properties/view/properties/timeline",type:"Control",options:{control:"arcgis-hub-timeline-editor",showTitleAndDescription:!1}}]}]},{type:"Section",labelKey:"shared.sections.heroBanner.label",elements:[{type:"Section",labelKey:"shared.sections.heroBannerAppearance.label",options:{section:"block",helperText:{labelKey:"shared.sections.heroBannerAppearance.helperText"}},elements:[{labelKey:`${e}.fields.hero.label`,scope:"/properties/view/properties/hero",type:"Control",options:{control:"hub-field-input-tile-select",layout:"horizontal",labels:[`{{${e}.fields.hero.map.label:translate}}`,`{{${e}.fields.hero.image.label:translate}}`],descriptions:[`{{${e}.fields.hero.map.description:translate}}`,`{{${e}.fields.hero.image.description:translate}}`],icons:["map-pin","image"]}},{labelKey:`${e}.fields.featuredImage.label`,scope:"/properties/view/properties/featuredImage",type:"Control",rule:{effect:i.HIDE,condition:{scope:"/properties/view/properties/hero",schema:{const:"map"}}},options:{control:"hub-field-input-image-picker",imgSrc:m((o=t.view)===null||o===void 0?void 0:o.featuredImageUrl,l.requestOptions),maxWidth:727,maxHeight:484,aspectRatio:1.5,sizeDescription:{labelKey:`${e}.fields.featuredImage.sizeDescription`}}},{labelKey:`${e}.fields.featuredImage.altText.label`,scope:"/properties/view/properties/featuredImageAltText",type:"Control",rule:{effect:i.HIDE,condition:{scope:"/properties/view/properties/hero",schema:{const:"map"}}}}]}]}]}};export{g as buildUiSchema};
