{"version":3,"file":"Center.cjs","names":["polymorphicFactory","useProps","useStyles","Box","classes"],"sources":["../../../src/components/Center/Center.tsx"],"sourcesContent":["import {\n  Box,\n  BoxProps,\n  polymorphicFactory,\n  PolymorphicFactory,\n  StylesApiProps,\n  useProps,\n  useStyles,\n} from '../../core';\nimport classes from './Center.module.css';\n\nexport type CenterStylesNames = 'root';\n\nexport interface CenterProps extends BoxProps, StylesApiProps<CenterFactory> {\n  /** Content to center */\n  children?: React.ReactNode;\n\n  /** If set, `inline-flex` is used instead of `flex` */\n  inline?: boolean;\n}\n\nexport type CenterFactory = PolymorphicFactory<{\n  props: CenterProps;\n  defaultRef: HTMLDivElement;\n  defaultComponent: 'div';\n  stylesNames: CenterStylesNames;\n}>;\n\nexport const Center = polymorphicFactory<CenterFactory>((_props) => {\n  const props = useProps('Center', null, _props);\n  const {\n    classNames,\n    className,\n    style,\n    styles,\n    unstyled,\n    vars,\n    inline,\n    mod,\n    attributes,\n    ...others\n  } = props;\n\n  const getStyles = useStyles<CenterFactory>({\n    name: 'Center',\n    props,\n    classes,\n    className,\n    style,\n    classNames,\n    styles,\n    unstyled,\n    attributes,\n    vars,\n  });\n\n  return <Box mod={[{ inline }, mod]} {...getStyles('root')} {...others} />;\n});\n\nCenter.classes = classes;\nCenter.displayName = '@mantine/core/Center';\n"],"mappings":";;;;;;;;;AA4BA,MAAa,SAASA,4BAAAA,oBAAmC,WAAW;CAClE,MAAM,QAAQC,kBAAAA,SAAS,UAAU,MAAM,OAAO;CAC9C,MAAM,EACJ,YACA,WACA,OACA,QACA,UACA,MACA,QACA,KACA,YACA,GAAG,WACD;CAEJ,MAAM,YAAYC,mBAAAA,UAAyB;EACzC,MAAM;EACN;EACA,SAAA,sBAAA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACD,CAAC;AAEF,QAAO,iBAAA,GAAA,kBAAA,KAACC,YAAAA,KAAD;EAAK,KAAK,CAAC,EAAE,QAAQ,EAAE,IAAI;EAAE,GAAI,UAAU,OAAO;EAAE,GAAI;EAAU,CAAA;EACzE;AAEF,OAAO,UAAUC,sBAAAA;AACjB,OAAO,cAAc"}