/* COPYRIGHT Esri - https://js.arcgis.com/1.2/LICENSE.txt */
import{a as n,e as c,f as d}from"./M2GHHPIB.js";import"./Z6NOHRUL.js";import"./GVM4XYEI.js";import"./NGDVSE4Z.js";import"./BTNJZZQQ.js";import{d as r}from"./5MKH4QDV.js";import"./3GWWHA4S.js";import"./3YYHZQJB.js";import"./TONS7KZJ.js";import"./Q62UEPOL.js";import{a as o,b as i}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";function u(e,t){let l=[];if(p(t)){let s=f(e);l.push(s)}let a=m(e,t);return l.push(a),{type:"Section",labelKey:`${e}.sections.downloads.label`,options:{},elements:l}}function p(e){return n(e)}function f(e){return{labelKey:`${e}.fields.serverExtractCapability.label`,scope:"/properties/serverExtractCapability",type:"Control",options:{control:"hub-field-input-tile-select",labels:[`{{${e}.fields.serverExtractCapability.exportDataSetting.label:translate}}`,`{{${e}.fields.serverExtractCapability.defaultDownloadsSystem.label:translate}}`],descriptions:[`{{${e}.fields.serverExtractCapability.exportDataSetting.description:translate}}`,`{{${e}.fields.serverExtractCapability.defaultDownloadsSystem.description:translate}}`],layout:"vertical",messages:[{type:i.custom,display:"notice",kind:"warning",icon:"exclamation-mark-triangle",titleKey:`${e}.fields.serverExtractCapability.noFormatConfigurationNotice.title`,labelKey:`${e}.fields.serverExtractCapability.noFormatConfigurationNotice.body`,allowShowBeforeInteract:!0,conditions:[{scope:"/properties/serverExtractCapability",schema:{const:!1}}]}]}}}function m(e,t){let l={labelKey:`${e}.fields.downloadFormats.label`,scope:"/properties/downloadFormats",type:"Control",options:{control:"hub-field-input-list",helperText:{labelKey:`${e}.fields.downloadFormats.helperText`},allowReorder:!0,allowHide:!0},rules:[]};return p(t)?l.rules.push({effect:o.DISABLE,conditions:[{scope:"/properties/serverExtractCapability",schema:{const:!1}}]}):y(t)&&(l.rules.push({effect:o.DISABLE,conditions:[!0]}),l.options.messages=[{type:i.custom,display:"notice",kind:"warning",icon:"exclamation-mark-triangle",titleKey:`${e}.fields.downloadFormats.downloadsUnavailableNotice.title`,labelKey:`${e}.fields.downloadFormats.downloadsUnavailableNotice.body`,allowShowBeforeInteract:!0,alwaysShow:!0}]),l}function y(e){return!c(e)}var v=async(e,t,l)=>{let a={type:"Layout",elements:[]};if(r("hub:content:workspace:settings:schedule",l,t).access){let s=[{type:"Control",scope:"/properties/schedule",labelKey:`${e}.sections.schedule.helperText`,options:{type:"Control",control:"hub-field-input-scheduler",labelKey:"fieldHeader",format:"select",inputs:[{type:"automatic"},{type:"daily"},{type:"weekly"},{type:"monthly"},{type:"yearly"},{type:"manual",helperActionIcon:"information-f",helperActionText:`{{${e}.fields.schedule.manual.helperActionText:translate}}`}]},rules:[{effect:o.DISABLE,conditions:[t.access!=="public"]}]},{type:"Notice",options:{notice:{configuration:{id:"schedule-unavailable-notice",noticeType:"notice",closable:!1,kind:"warning",icon:"exclamation-mark-triangle",scale:"m"},title:`{{${e}.fields.schedule.unavailableNotice.title:translate}}`,message:`{{${e}.fields.schedule.unavailableNotice.body:translate}}`,autoShow:!0}},rules:[{effect:o.SHOW,conditions:[t.access!=="public"]}]},{type:"Control",scope:"/properties/_forceUpdate",options:{control:"hub-field-input-tile-select",type:"checkbox",labels:[`{{${e}.fields.schedule.forceUpdateButton.label:translate}}`],descriptions:[`{{${e}.fields.schedule.forceUpdateButton.description:translate}}`]},rules:[{effect:o.SHOW,conditions:[t.access==="public"]}]}];a.elements.push({type:"Section",labelKey:`${e}.sections.schedule.label`,elements:s})}if(d(t)){let s=u(e,t);a.elements.push(s)}return a};export{v as buildUiSchema};
