{"version":3,"file":"get-style-object.cjs","sources":["../../../../src/core/Box/get-style-object/get-style-object.ts"],"sourcesContent":["import type { RaikouTheme } from '../../RaikouProvider';\nimport type { RaikouStyleProp } from '../Box.types';\n\nexport function getStyleObject(\n  style: RaikouStyleProp | undefined,\n  theme: RaikouTheme\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"],"names":[],"mappings":";;AAGgB,SAAA,cAAA,CACd,OACA,KACqB,EAAA;AACrB,EAAI,IAAA,KAAA,CAAM,OAAQ,CAAA,KAAK,CAAG,EAAA;AACxB,IAAO,OAAA,CAAC,GAAG,KAAK,CAAE,CAAA,MAAA;AAAA,MAChB,CAAC,GAAK,EAAA,IAAA,MAAU,EAAE,GAAG,KAAK,GAAG,cAAA,CAAe,IAAM,EAAA,KAAK,CAAE,EAAA,CAAA;AAAA,MACzD;AAAC,KACH;AAAA;AAGF,EAAI,IAAA,OAAO,UAAU,UAAY,EAAA;AAC/B,IAAA,OAAO,MAAM,KAAK,CAAA;AAAA;AAGpB,EAAA,IAAI,SAAS,IAAM,EAAA;AACjB,IAAA,OAAO,EAAC;AAAA;AAGV,EAAO,OAAA,KAAA;AACT;;;;"}