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);

// src/components/PisellSuperTabs/utils/getRowKey.ts
var getRowKey_exports = {};
__export(getRowKey_exports, {
  getRowKey: () => getRowKey
});
module.exports = __toCommonJS(getRowKey_exports);
var getRowKey = (record, index, rowKey) => {
  if (typeof rowKey === "function") {
    return rowKey(record, index);
  }
  if (typeof rowKey === "string") {
    const key = record == null ? void 0 : record[rowKey];
    if (key !== void 0 && key !== null) {
      return String(key);
    }
  }
  const defaultKey = record == null ? void 0 : record.key;
  if (defaultKey !== void 0 && defaultKey !== null) {
    return String(defaultKey);
  }
  if (process.env.NODE_ENV === "development") {
    console.warn(
      "[PisellSuperTabs] rowKey is not found in data item, using index as fallback. This may cause issues with state management.",
      record
    );
  }
  return String(index);
};
// Annotate the CommonJS export names for ESM import in node:
0 && (module.exports = {
  getRowKey
});
