"use strict";
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
const jsxRuntime = require("react/jsx-runtime");
require("react");
require("clsx");
const useProps = require("../../../core/MantineProvider/use-props/use-props.cjs");
const factory = require("../../../core/factory/factory.cjs");
const UnstyledButton = require("../../UnstyledButton/UnstyledButton.cjs");
const Pagination_context = require("../Pagination.context.cjs");
const Pagination_module_css = require("../Pagination.module.css.cjs");
const defaultProps = {
  withPadding: true
};
const PaginationControl = factory.factory((_props, ref) => {
  const props = useProps.useProps("PaginationControl", defaultProps, _props);
  const {
    classNames,
    className,
    style,
    styles,
    vars,
    active,
    disabled,
    withPadding,
    mod,
    ...others
  } = props;
  const ctx = Pagination_context.usePaginationContext();
  const _disabled = disabled || ctx.disabled;
  return /* @__PURE__ */ jsxRuntime.jsx(
    UnstyledButton.UnstyledButton,
    {
      ref,
      disabled: _disabled,
      mod: [{ active, disabled: _disabled, "with-padding": withPadding }, mod],
      ...ctx.getStyles("control", { className, style, classNames, styles, active: !_disabled }),
      ...others
    }
  );
});
PaginationControl.classes = Pagination_module_css.default;
PaginationControl.displayName = "@mantine/core/PaginationControl";
exports.PaginationControl = PaginationControl;
