"use strict";
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
const jsxRuntime = require("react/jsx-runtime");
const React = require("react");
;/* empty css                                                                                                                                                                                        */
;/* empty css                                                                                                                                                                                         */
;/* empty css                                                                                                                                                                                                 */
;/* empty css                                                                                                                                                                                            */
;/* empty css                                                                                                                                                                                            */
const index = require("../../primitive/Typography/index.cjs");
const Card = require("../../node_modules/.pnpm/@mantine_core@7.15.2_patch_hash_jclkxeaefn6uz54h34k3r3yjsq_@mantine_hooks@7.15.2_react@18.3.1_szqfuioo5damkjdixckhzmwycq/node_modules/@mantine/core/esm/components/Card/Card.cjs");
const Stack = require("../../node_modules/.pnpm/@mantine_core@7.15.2_patch_hash_jclkxeaefn6uz54h34k3r3yjsq_@mantine_hooks@7.15.2_react@18.3.1_szqfuioo5damkjdixckhzmwycq/node_modules/@mantine/core/esm/components/Stack/Stack.cjs");
const Group = require("../../node_modules/.pnpm/@mantine_core@7.15.2_patch_hash_jclkxeaefn6uz54h34k3r3yjsq_@mantine_hooks@7.15.2_react@18.3.1_szqfuioo5damkjdixckhzmwycq/node_modules/@mantine/core/esm/components/Group/Group.cjs");
const Divider$1 = require("../../node_modules/.pnpm/@mantine_core@7.15.2_patch_hash_jclkxeaefn6uz54h34k3r3yjsq_@mantine_hooks@7.15.2_react@18.3.1_szqfuioo5damkjdixckhzmwycq/node_modules/@mantine/core/esm/components/Divider/Divider.cjs");
const PropertyCard = ({ title, children, labelProps, valueProps, ...rest }) => {
  const renderChildren = () => {
    return React.Children.map(children, (child) => {
      if (!child || typeof child !== "object" || !("props" in child)) {
        return child;
      }
      return React.cloneElement(child, {
        ...child.props,
        labelProps: {
          ...labelProps,
          ...child.props.labelProps
        },
        valueProps: {
          ...valueProps,
          ...child.props.valueProps
        }
      });
    });
  };
  return /* @__PURE__ */ jsxRuntime.jsxs(Card.Card, { p: "xl", ...rest, children: [
    /* @__PURE__ */ jsxRuntime.jsx(index.Typography, { variant: "headline-sm", mb: 16, children: title }),
    /* @__PURE__ */ jsxRuntime.jsx(Stack.Stack, { gap: 16, children: renderChildren() })
  ] });
};
const Item = ({ label, children, labelProps, valueProps, ...rest }) => {
  return /* @__PURE__ */ jsxRuntime.jsxs(Group.Group, { gap: "md", wrap: "nowrap", ...rest, children: [
    /* @__PURE__ */ jsxRuntime.jsx(index.Typography, { variant: "label-lg", miw: 128, ...labelProps, children: label }),
    /* @__PURE__ */ jsxRuntime.jsx(index.Typography, { variant: "body-lg", sx: { wordBreak: "break-all" }, ...valueProps, children })
  ] });
};
const Divider = (props) => {
  return /* @__PURE__ */ jsxRuntime.jsx(Divider$1.Divider, { color: "carbon.4", my: "xs", ...props });
};
PropertyCard.Item = Item;
PropertyCard.Divider = Divider;
exports.PropertyCard = PropertyCard;
