/* COPYRIGHT Esri - https://js.arcgis.com/1.2/LICENSE.txt */
import{a as n}from"./WHUV5WSZ.js";import{a as o}from"./Y4UADTHQ.js";import{a as m}from"./AHFHZ4UG.js";import"./Z6NOHRUL.js";import"./GVM4XYEI.js";import"./NGDVSE4Z.js";import"./BTNJZZQQ.js";import"./5MKH4QDV.js";import{a as s}from"./SET62CIS.js";import{a as i}from"./SGRKBD4M.js";import"./3GWWHA4S.js";import"./3YYHZQJB.js";import"./JEJ23R3P.js";import"./TONS7KZJ.js";import"./Q62UEPOL.js";import{b as r}from"./RQFHSMWM.js";import"./TBHFGSW5.js";import"./YPYVBSI2.js";import"./7ETQT3G4.js";import"./QNRKUIIZ.js";import"./GQCZRU3J.js";import"./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 p=(e,l)=>["myContent","organization"].map(d=>{let a=o("initiativeTemplate.fields.recommendedTemplates",d,"item",{user:e});return a.collections=[c(l)],a}),c=e=>({targetEntity:"item",key:"recommendedTemplates",label:`${e}.fields.recommendedTemplates.collection.label`,scope:{targetEntity:"item",filters:[{predicates:[{type:"Solution"}]},{predicates:[{typekeywords:["hubSolutionTemplate"]},{typekeywords:["Template"]}],operation:"OR"}]}});var k=async(e,l,t)=>({type:"Layout",elements:[{type:"Section",labelKey:`${e}.sections.basicInfo.label`,options:{helperText:{labelKey:`${e}.sections.basicInfo.helperText`}},elements:[{type:"Control",scope:"/properties/name",labelKey:`${e}.fields.name.label`,options:{messages:[{type:r.error,keyword:"required",icon:!0,labelKey:`${e}.fields.name.requiredError`},{type:"ERROR",keyword:"maxLength",icon:!0,labelKey:"shared.fields.name.maxLengthError"},{type:"ERROR",keyword:"format",icon:!0,labelKey:`${e}.fields.name.entityTitleValidatorError`}]}},{type:"Control",scope:"/properties/summary",labelKey:`${e}.fields.summary.label`,options:{control:"hub-field-input-input",type:"textarea",rows:4,messages:[{type:"ERROR",keyword:"maxLength",icon:!0,labelKey:"shared.fields.summary.maxLengthError"}]}},...m(e,l.thumbnail,n(l),"initiativeTemplate",t.requestOptions),{type:"Section",labelKey:`${e}.sections.description.label`,options:{section:"block"},elements:[{type:"Control",scope:"/properties/description",labelKey:`${e}.fields.description.label`,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 i(l.tags,t.portal.id,t.hubRequestOptions),allowCustomValues:!0,selectionMode:"multiple",placeholderIcon:"label"}},...await s(e,t)]}]},{type:"Section",labelKey:`${e}.sections.templateDetails.label`,elements:[{type:"Control",scope:"/properties/previewUrl",labelKey:`${e}.fields.previewUrl.label`,options:{helperText:{labelKey:`${e}.fields.previewUrl.helperText`},messages:[{type:"ERROR",keyword:"format",icon:!0,labelKey:"shared.errors.urlFormat"},{type:"ERROR",keyword:"if",hidden:!0}]}},{type:"Control",scope:"/properties/recommendedTemplates",labelKey:`${e}.fields.recommendedTemplates.label`,options:{control:"hub-field-input-gallery-picker",targetEntity:"item",catalogs:p(t.currentUser,e),facets:[{label:`{{${e}.fields.recommendedTemplates.facets.sharing:translate}}`,key:"access",field:"access",display:"multi-select",operation:"OR"}],canReorder:!1,linkTarget:"siteRelative",pickerTitle:{labelKey:`${e}.fields.recommendedTemplates.pickerTitle`}}}]}]});export{k as buildUiSchema};
