/* COPYRIGHT Esri - https://js.arcgis.com/5.0/LICENSE.txt */
import e from"../../core/Error.js";import{JSONMap as t}from"../../core/jsonMap.js";import{getTaskExecutionMode as r}from"../../rest/print.js";import{execute as o}from"../../rest/geoprocessor/execute.js";import{submitJob as i}from"../../rest/geoprocessor/submitJob.js";import m from"./LayoutTemplateInfo.js";async function a(t,a,s){if(!t)throw new e("print:invalid-layout-info-task-url","Can't fetch layout template info",{url:t});if("async"===await r(t,"GetLayoutTemplatesInfo",s)){const e=await i(t,a,void 0,s||void 0);await e.waitForJobCompletion();return(await e.fetchResultData("Output_JSON")).value.map(e=>m.fromJSON(e))}return(await o(t,a,null,s)).results[0].value.map(e=>m.fromJSON(e))}const s=new t({inch:"inches",foot:"feet",yard:"yards",mile:"miles","nautical-mile":"nautical-miles",millimeter:"millimeters",centimeter:"centimeters",decimeter:"decimeters",meter:"meters",kilometer:"kilometers"});export{a as fetchLayoutTemplateInfos,s as valueUnitKebabDict};
