import {
  __name,
  init_esm_shims
} from "./chunk-BFNZYC5O.js";

// src/utilities/file-path-utils.ts
init_esm_shims();
import { sep } from "node:path";
var removeExtension = /* @__PURE__ */ __name((filePath) => {
  const result = !filePath || (filePath.match(/./g) || []).length <= 1 ? "." : filePath.lastIndexOf(".") ? filePath.substring(0, filePath.lastIndexOf(".")) : filePath;
  if (result.startsWith("./")) {
    return result.substring(2);
  }
  if (result.startsWith(".") || result.startsWith("/")) {
    return result.substring(1);
  }
  return result;
}, "removeExtension");
function findFileName(filePath) {
  return filePath?.split(filePath?.includes(sep) ? sep : filePath?.includes("/") ? "/" : "\\")?.pop() ?? "";
}
__name(findFileName, "findFileName");

export {
  removeExtension,
  findFileName
};
