import { isString } from "lodash-es";
import { useAttachSymbolToMap } from "./use-attach-symbol-to-map.js";
import { isValidShape } from "../functions/is-valid-shape.js";
const getSymbolType = (shape) => {
  if (!isString(shape)) {
    return "icon";
  } else if (isValidShape(shape)) {
    return "shape";
  } else {
    return "emoji";
  }
};
const getSymbolName = (shape) => {
  if (!isString(shape)) {
    return "custom-icon";
  } else if (isValidShape(shape)) {
    return shape;
  } else {
    return "emoji";
  }
};
const useLoadSymbolIntoMap = (shape, layerId, outputSize) => {
  const symbolType = getSymbolType(shape);
  const symbolName = getSymbolName(shape);
  useAttachSymbolToMap(shape, layerId, outputSize);
  return {
    symbolType,
    symbolName: `${symbolName}-${layerId}`
  };
};
export {
  useLoadSymbolIntoMap
};
//# sourceMappingURL=use-load-symbol-into-map.js.map
