/*
All material copyright Esri, All Rights Reserved, unless otherwise specified.
See https://js.arcgis.com/5.0/esri/copyright.txt for details.
*/
import e from"../../Color.js";import{isSome as a}from"../../core/arrayUtils.js";import r from"./support/colors.js";import{createThemes as t,getThemesforBasemap as l,getRawSchemes as o,filterSchemesByName as n,filterSchemesByTag as m}from"./support/symbologyUtils.js";const i=t({themeDictionary:{default:{name:"default",label:"Default",description:"Default theme for visualizing features using heatmap.",schemes:{default:{light:{primary:"heatmap-v1",secondary:["heatmap-v2","heatmap-v3","heatmap-plasma","heatmap-cividis","neutral-yellow-orange","neutral-yellow-green","neutral-yellow-purple","neutral-yellow-magenta","neutral-white-blue","neutral-white-blue-metal","neutral-white-gold","neutral-yellow-bronze","heatmap-v4","heatmap-viridis","heatmap-magma","heatmap-inferno","dark-yellow-orange","dark-yellow-green","dark-yellow-purple","dark-yellow-magenta","dark-white-blue","dark-white-blue-metal","dark-white-gold","dark-yellow-bronze"]},dark:{primary:"heatmap-v4",secondary:["heatmap-inferno","heatmap-viridis","heatmap-magma","dark-white-blue","dark-yellow-orange","dark-yellow-green","dark-yellow-purple","dark-yellow-magenta","dark-white-blue-metal","dark-white-gold","dark-yellow-bronze","heatmap-v1","heatmap-v2","heatmap-v3","heatmap-plasma","heatmap-cividis","neutral-yellow-orange","neutral-yellow-green","neutral-yellow-purple","neutral-yellow-magenta","neutral-white-blue","neutral-white-blue-metal","neutral-white-gold","neutral-yellow-bronze"]}}}}}});function p(e){return l(i,e)}function s(e){const r="default",t=o({basemap:e.basemap,basemapTheme:e.basemapTheme,theme:i.get(r)});if(!t)return;const{schemesInfo:l,basemapId:n,basemapTheme:m}=t,p=`${r}/${n}/`;return{primaryScheme:c(l.primary,p+l.primary),secondarySchemes:l.secondary.map(e=>c(e,p+e)).filter(a),basemapId:n,basemapTheme:m}}function u(e){return n(e.name,s(e))}function d(e){return m(e.includedTags,e.excludedTags,s(e))}function h(a){if(!a)return;const r={...a};return r.colors=r.colors.map(a=>new e(a)),r.tags=[...r.tags],r}function c(e,a){const t=r[e];if(t)return y({id:a,name:t.name,tags:t.tags,colors:t.stops??[],opacity:.7})}function y(a){return{id:a.id,name:a.name,tags:[...a.tags],colors:a.colors.map(a=>new e(a)),opacity:a.opacity}}export{h as cloneScheme,u as getSchemeByName,s as getSchemes,d as getSchemesByTag,p as getThemes};
