import e from"@arcgis/core/layers/support/LabelClass";import{assertNever as r,checkArg as n}from"../utilities/checkArg.js";export var LabelingInfo;!function(r){r.toEsriApiLabelClass=function(r){return n("labelingInfo",r).isNotMissing(),e.fromJSON(r)},r.fromEsriApiLabelClass=function(e){return n("labelClass",e).isNotMissing(),e.toJSON()}}(LabelingInfo||(LabelingInfo={}));export var LabelPlacement;function t(e,n){const t=e;switch(t){case"above-along":return"esriServerLinePlacementAboveAlong";case"above-center":return"esriServerPointLabelPlacementAboveCenter";case"above-left":return"esriServerPointLabelPlacementAboveLeft";case"above-right":return"esriServerPointLabelPlacementAboveRight";case"always-horizontal":return"esriServerPolygonPlacementAlwaysHorizontal";case"below-along":return"esriServerLinePlacementBelowAlong";case"below-center":return"esriServerPointLabelPlacementBelowCenter";case"below-left":return"esriServerPointLabelPlacementBelowLeft";case"below-right":return"esriServerPointLabelPlacementBelowRight";case"center-along":return"esriServerLinePlacementCenterAlong";case"center-center":return"esriServerPointLabelPlacementCenterCenter";case"center-left":return"esriServerPointLabelPlacementCenterLeft";case"center-right":return"esriServerPointLabelPlacementCenterRight";default:return r(t,n)}}function a(e,n){const t=e;switch(t){case"esriServerLinePlacementAboveAfter":case"esriServerLinePlacementAboveEnd":case"esriServerPointLabelPlacementAboveRight":return"above-right";case"esriServerLinePlacementAboveAlong":return"above-along";case"esriServerLinePlacementAboveBefore":case"esriServerPointLabelPlacementAboveLeft":case"esriServerLinePlacementAboveStart":return"above-left";case"esriServerPointLabelPlacementAboveCenter":return"above-center";case"esriServerPolygonPlacementAlwaysHorizontal":return"always-horizontal";case"esriServerLinePlacementBelowAfter":case"esriServerLinePlacementBelowEnd":case"esriServerPointLabelPlacementBelowRight":return"below-right";case"esriServerLinePlacementBelowAlong":return"below-along";case"esriServerLinePlacementBelowBefore":case"esriServerPointLabelPlacementBelowLeft":case"esriServerLinePlacementBelowStart":return"below-left";case"esriServerPointLabelPlacementBelowCenter":return"below-center";case"esriServerLinePlacementCenterAfter":case"esriServerLinePlacementCenterEnd":case"esriServerPointLabelPlacementCenterRight":return"center-right";case"esriServerLinePlacementCenterAlong":return"center-along";case"esriServerLinePlacementCenterBefore":case"esriServerPointLabelPlacementCenterLeft":case"esriServerLinePlacementCenterStart":return"center-left";case"esriServerPointLabelPlacementCenterCenter":return"center-center";default:return r(t,n)}}!function(e){e.fromEsriApiLabelPlacement=function(e){return!!a(e)?e:t(e,new Error("Unrecognized label placement."))},e.toEsriApiLabelPlacement=function(e){return!!t(e)?e:a(e,new Error("Unrecognized label placement."))}}(LabelPlacement||(LabelPlacement={}));