/*
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
See https://js.arcgis.com/4.24/esri/copyright.txt for details.
*/
define(["exports","../../chunks/_rollupPluginBabelHelpers","../../core/Error","../../core/maybe","../../intl/messages","./support/clusterUtils","../../views/2d/layers/support/clusterUtils"],(function(e,r,t,l,n,s,a){"use strict";function i(e){return o.apply(this,arguments)}function o(){return(o=r._asyncToGenerator((function*(e){const{layer:r,renderer:l}=e;yield r.load();const n=l||r.renderer;if(!a.isClusterCompatibleRenderer(n))throw new t("clusters-popup:invalid-parameters","'renderer' is not valid");return{layer:r,renderer:n}}))).apply(this,arguments)}function u(e){return p.apply(this,arguments)}function p(){return(p=r._asyncToGenerator((function*(e){const[{renderer:r,layer:t},a]=yield Promise.all([i(e),n.fetchMessageBundle("esri/smartMapping/t9n/smartMapping")]),o=yield s.createPopupTemplate(t,r);let u=null;return l.isSome(o)?(u={name:"clusters",title:a.clusters.templateTitle,value:o},{primaryTemplate:u,secondaryTemplates:[]}):null}))).apply(this,arguments)}e.getTemplates=u,Object.defineProperties(e,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})}));
