"use strict";
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 get_joined_boxes_responsive_corner_flags_exports = {};
__export(get_joined_boxes_responsive_corner_flags_exports, {
  getJoinedBoxesResponsiveCornerFlags: () => getJoinedBoxesResponsiveCornerFlags
});
module.exports = __toCommonJS(get_joined_boxes_responsive_corner_flags_exports);
const getJoinedBoxesResponsiveCornerFlags = ({
  cellIndex,
  totalCells,
  columnsPerRow,
  responsiveColumnsPerRow
}) => {
  const base = getJoinedBoxesCellCornerFlags({ cellIndex, totalCells, columnsPerRow });
  const mid = getJoinedBoxesCellCornerFlags({
    cellIndex,
    totalCells,
    columnsPerRow: responsiveColumnsPerRow
  });
  const sm = getJoinedBoxesCellCornerFlags({ cellIndex, totalCells, columnsPerRow: 1 });
  return {
    ...base,
    "data-corner-mid-tl": mid["data-corner-tl"],
    "data-corner-mid-tr": mid["data-corner-tr"],
    "data-corner-mid-bl": mid["data-corner-bl"],
    "data-corner-mid-br": mid["data-corner-br"],
    "data-corner-sm-tl": sm["data-corner-tl"],
    "data-corner-sm-tr": sm["data-corner-tr"],
    "data-corner-sm-bl": sm["data-corner-bl"],
    "data-corner-sm-br": sm["data-corner-br"]
  };
};
const getJoinedBoxesCellCornerFlags = ({
  cellIndex,
  totalCells,
  columnsPerRow
}) => {
  const topRight = Math.min(columnsPerRow - 1, totalCells - 1);
  const lastRowStart = Math.floor((totalCells - 1) / columnsPerRow) * columnsPerRow;
  return {
    "data-corner-tl": cellIndex === 0 || void 0,
    "data-corner-tr": cellIndex === topRight || void 0,
    "data-corner-bl": cellIndex === lastRowStart || void 0,
    "data-corner-br": cellIndex === totalCells - 1 || void 0
  };
};
//# sourceMappingURL=get-joined-boxes-responsive-corner-flags.js.map
