"use client";
const require_use_props = require("../../../core/MantineProvider/use-props/use-props.cjs");
const require_use_styles = require("../../../core/styles-api/use-styles/use-styles.cjs");
const require_factory = require("../../../core/factory/factory.cjs");
const require_Box = require("../../../core/Box/Box.cjs");
const require_InputWrapper_context = require("../../Input/InputWrapper.context.cjs");
const require_PillsInput_context = require("../PillsInput.context.cjs");
const require_PillsInput_module = require("../PillsInput.module.cjs");
let react = require("react");
let _mantine_hooks = require("@mantine/hooks");
let react_jsx_runtime = require("react/jsx-runtime");
//#region packages/@mantine/core/src/components/PillsInput/PillsInputField/PillsInputField.tsx
const defaultProps = { type: "visible" };
const PillsInputField = require_factory.factory((_props) => {
	const props = require_use_props.useProps("PillsInputField", defaultProps, _props);
	const { classNames, className, style, styles, unstyled, vars, type, disabled, id, pointer, mod, attributes, ref, ...others } = props;
	const ctx = (0, react.use)(require_PillsInput_context.PillsInputContext);
	const inputWrapperCtx = (0, react.use)(require_InputWrapper_context.InputWrapperContext);
	const getStyles = require_use_styles.useStyles({
		name: "PillsInputField",
		classes: require_PillsInput_module.default,
		props,
		className,
		style,
		classNames,
		styles,
		unstyled,
		attributes,
		rootSelector: "field"
	});
	const _disabled = disabled || ctx?.disabled;
	return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_Box.Box, {
		component: "input",
		ref: (0, _mantine_hooks.useMergedRef)(ref, ctx?.fieldRef),
		"data-type": type,
		disabled: _disabled,
		mod: [{
			disabled: _disabled,
			pointer
		}, mod],
		...getStyles("field"),
		...others,
		id: inputWrapperCtx?.inputId || id,
		"aria-invalid": ctx?.hasError,
		"aria-describedby": inputWrapperCtx?.describedBy,
		type: "text",
		onMouseDown: (event) => !pointer && event.stopPropagation()
	});
});
PillsInputField.classes = require_PillsInput_module.default;
PillsInputField.displayName = "@mantine/core/PillsInputField";
//#endregion
exports.PillsInputField = PillsInputField;

//# sourceMappingURL=PillsInputField.cjs.map