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/table/Actions/component/ColumnsSetting/utils.ts
var utils_exports = {};
__export(utils_exports, {
  isFixedOrderValid: () => isFixedOrderValid
});
module.exports = __toCommonJS(utils_exports);
function isFixedOrderValid(columns) {
  let leftStart = -1;
  let leftEnd = -1;
  let rightStart = -1;
  for (let i = 0; i < columns.length; i++) {
    const column = columns[i];
    if (column.fixed === true || column.fixed === "left") {
      if (leftStart === -1) {
        leftStart = i;
      }
      if (leftEnd !== -1 || rightStart !== -1) {
        return false;
      }
    } else if (column.fixed === "right") {
      if (rightStart === -1) {
        rightStart = i;
      }
      if (leftEnd === -1 && leftStart !== -1) {
        leftEnd = i - 1;
      }
    } else {
      if (leftEnd === -1 && leftStart !== -1) {
        leftEnd = i - 1;
      }
      if (rightStart !== -1) {
        return false;
      }
    }
  }
  return leftStart === -1 || leftStart === 0;
}
// Annotate the CommonJS export names for ESM import in node:
0 && (module.exports = {
  isFixedOrderValid
});
