"use strict";
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
const jsxRuntime = require("react/jsx-runtime");
const React = require("react");
const Dropzone_context = require("./Dropzone.context.cjs");
const upperFirst = require("../../../../../@mantine_hooks@7.15.2_react@18.3.1/node_modules/@mantine/hooks/esm/utils/upper-first/upper-first.cjs");
const useProps = require("../../../../../@mantine_core@7.15.2_patch_hash_jclkxeaefn6uz54h34k3r3yjsq_@mantine_hooks@7.15.2_react@18.3.1_szqfuioo5damkjdixckhzmwycq/node_modules/@mantine/core/esm/core/MantineProvider/use-props/use-props.cjs");
const isElement = require("../../../../../@mantine_core@7.15.2_patch_hash_jclkxeaefn6uz54h34k3r3yjsq_@mantine_hooks@7.15.2_react@18.3.1_szqfuioo5damkjdixckhzmwycq/node_modules/@mantine/core/esm/core/utils/is-element/is-element.cjs");
function createDropzoneStatus(status) {
  const Component = (props) => {
    const { children, ...others } = useProps.useProps(`Dropzone${upperFirst.upperFirst(status)}`, {}, props);
    const ctx = Dropzone_context.useDropzoneContext();
    const _children = isElement.isElement(children) ? children : /* @__PURE__ */ jsxRuntime.jsx("span", { children });
    if (ctx[status]) {
      return React.cloneElement(_children, others);
    }
    return null;
  };
  Component.displayName = `@mantine/dropzone/${upperFirst.upperFirst(status)}`;
  return Component;
}
const DropzoneAccept = createDropzoneStatus("accept");
const DropzoneReject = createDropzoneStatus("reject");
const DropzoneIdle = createDropzoneStatus("idle");
exports.DropzoneAccept = DropzoneAccept;
exports.DropzoneIdle = DropzoneIdle;
exports.DropzoneReject = DropzoneReject;
