"use strict";
var __create = Object.create;
var __defProp = Object.defineProperty;
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
var __getOwnPropNames = Object.getOwnPropertyNames;
var __getProtoOf = Object.getPrototypeOf;
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 __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
  // If the importer is in node compatibility mode or this is not an ESM
  // file that has been converted to a CommonJS file using a Babel-
  // compatible transform (i.e. "__esModule" has not been set), then set
  // "default" to the CommonJS "module.exports" for node compatibility.
  isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
  mod
));
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
var strings_exports = {};
__export(strings_exports, {
  fileName: () => fileName,
  importAlias: () => importAlias,
  typeName: () => typeName,
  varName: () => varName
});
module.exports = __toCommonJS(strings_exports);
var utils = __toESM(require("../utils"));
const TYPESCRIPT_RESERVED_TOKENS = /* @__PURE__ */ new Set([
  "break",
  "as",
  "any",
  "case",
  "implements",
  "boolean",
  "catch",
  "interface",
  "constructor",
  "class",
  "let",
  "declare",
  "const",
  "package",
  "get",
  "continue",
  "private",
  "module",
  "debugger",
  "protected",
  "require",
  "default",
  "public",
  "number",
  "delete",
  "static",
  "set",
  "do",
  "yield",
  "string",
  "else",
  "symbol",
  "enum",
  "type",
  "export",
  "from",
  "extends",
  "of",
  "false",
  "finally",
  "for",
  "function",
  "if",
  "import",
  "in",
  "instanceof",
  "new",
  "null",
  "return",
  "super",
  "switch",
  "this",
  "throw",
  "true",
  "try",
  "typeof",
  "var",
  "void",
  "while",
  "with"
]);
const SPECIAL_FILE_NAME_CHARS = /[^a-zA-Z0-9_\-\.]/g;
const escapeTypescriptReserved = (str) => {
  if (TYPESCRIPT_RESERVED_TOKENS.has(str)) {
    return `_${str}`;
  }
  return str;
};
const escapeFileNameSpecialChars = (str) => str.replace(SPECIAL_FILE_NAME_CHARS, "-");
const apply = (str, ...transforms) => transforms.reduce((acc, transform) => transform(acc), str);
const typeName = (name) => apply(name, utils.casing.to.pascalCase);
const importAlias = (name) => apply(name, utils.casing.to.camelCase, escapeTypescriptReserved);
const varName = (name) => apply(name, utils.casing.to.camelCase, escapeTypescriptReserved);
const fileName = (name) => apply(name, escapeFileNameSpecialChars);
// Annotate the CommonJS export names for ESM import in node:
0 && (module.exports = {
  fileName,
  importAlias,
  typeName,
  varName
});
//# sourceMappingURL=strings.js.map
