{"version":3,"file":"get-style-object.cjs","names":[],"sources":["../../../../src/core/Box/get-style-object/get-style-object.ts"],"sourcesContent":["import type { MantineTheme } from '../../MantineProvider';\nimport type { MantineStyleProp } from '../Box.types';\n\nexport function getStyleObject(\n  style: MantineStyleProp | undefined,\n  theme: MantineTheme\n): React.CSSProperties {\n  if (Array.isArray(style)) {\n    return [...style].reduce<Record<string, any>>(\n      (acc, item) => ({ ...acc, ...getStyleObject(item, theme) }),\n      {}\n    );\n  }\n\n  if (typeof style === 'function') {\n    return style(theme);\n  }\n\n  if (style == null) {\n    return {};\n  }\n\n  return style;\n}\n"],"mappings":";;AAGA,SAAgB,eACd,OACA,OACqB;CACrB,IAAI,MAAM,QAAQ,KAAK,GACrB,OAAO,CAAC,GAAG,KAAK,EAAE,QACf,KAAK,UAAU;EAAE,GAAG;EAAK,GAAG,eAAe,MAAM,KAAK;CAAE,IACzD,CAAC,CACH;CAGF,IAAI,OAAO,UAAU,YACnB,OAAO,MAAM,KAAK;CAGpB,IAAI,SAAS,MACX,OAAO,CAAC;CAGV,OAAO;AACT"}