/*
All material copyright Esri, All Rights Reserved, unless otherwise specified.
See https://js.arcgis.com/5.0/esri/copyright.txt for details.
*/
import{numericHash as e}from"../../../../../../core/string.js";import{validateLabelingInfo as l}from"../../../../../../layers/support/labelingInfo.js";import{getServiceGeometryType as s}from"../../layerAdapters/geometryUtils.js";import{createSymbolMeshSchemas as a}from"./symbols/SymbolSchema.js";async function o(e,a,o){const r=a.labelsVisible&&a.labelingInfo||[],i=s(a),t=l(r,i);return{type:"label",classes:await Promise.all(t.map((l,s)=>n(e,l,a.labelsVisible,a.labelingInfoSource,s,i,o)))}}async function n(l,s,o,n,r,i,t){const m=e(`${n} ${r}`),c=n,p=await a(s,{schemaOptions:l,uniforms:t,layerId:c,labelClassId:m});return{maxScale:s.maxScale,minScale:s.minScale,deconflictionEnabled:"none"!==s.deconflictionStrategy&&o,expression:s.labelExpressionInfo?.expression??s.labelExpression,where:s.where,meshes:p,layerId:c,labelClassId:m,geometryType:i}}export{o as createLabelMatcherSchema};
