var __defProp = Object.defineProperty;
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
var __getOwnPropNames = Object.getOwnPropertyNames;
var __hasOwnProp = Object.prototype.hasOwnProperty;
var __export = (target, all) => {
  for (var name in all)
    __defProp(target, name, { get: all[name], enumerable: true });
};
var __copyProps = (to, from, except, desc) => {
  if (from && typeof from === "object" || typeof from === "function") {
    for (let key of __getOwnPropNames(from))
      if (!__hasOwnProp.call(to, key) && key !== except)
        __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
  }
  return to;
};
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
var use_load_symbol_into_map_exports = {};
__export(use_load_symbol_into_map_exports, {
  useLoadSymbolIntoMap: () => useLoadSymbolIntoMap
});
module.exports = __toCommonJS(use_load_symbol_into_map_exports);
var import_lodash_es = require("lodash");
var import_use_attach_symbol_to_map = require("./use-attach-symbol-to-map.js");
var import_is_valid_shape = require("../functions/is-valid-shape.js");
const getSymbolType = (shape) => {
  if (!(0, import_lodash_es.isString)(shape)) {
    return "icon";
  } else if ((0, import_is_valid_shape.isValidShape)(shape)) {
    return "shape";
  } else {
    return "emoji";
  }
};
const getSymbolName = (shape) => {
  if (!(0, import_lodash_es.isString)(shape)) {
    return "custom-icon";
  } else if ((0, import_is_valid_shape.isValidShape)(shape)) {
    return shape;
  } else {
    return "emoji";
  }
};
const useLoadSymbolIntoMap = (shape, layerId, outputSize) => {
  const symbolType = getSymbolType(shape);
  const symbolName = getSymbolName(shape);
  (0, import_use_attach_symbol_to_map.useAttachSymbolToMap)(shape, layerId, outputSize);
  return {
    symbolType,
    symbolName: `${symbolName}-${layerId}`
  };
};
