"use strict";
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
const getThemeStyles = require("./get-theme-styles/get-theme-styles.cjs");
const resolveStyle = require("./resolve-style/resolve-style.cjs");
const resolveStyles = require("./resolve-styles/resolve-styles.cjs");
const resolveVars = require("./resolve-vars/resolve-vars.cjs");
function getStyle({
  theme,
  themeName,
  selector,
  options,
  props,
  stylesCtx,
  rootSelector,
  styles,
  style,
  vars,
  varsResolver,
  headless,
  withStylesTransform
}) {
  return {
    ...!withStylesTransform && getThemeStyles.getThemeStyles({ theme, themeName, props, stylesCtx, selector }),
    ...!withStylesTransform && resolveStyles.resolveStyles({ theme, styles, props, stylesCtx })[selector],
    ...!withStylesTransform && resolveStyles.resolveStyles({ theme, styles: options == null ? void 0 : options.styles, props: (options == null ? void 0 : options.props) || props, stylesCtx })[selector],
    ...resolveVars.resolveVars({ theme, props, stylesCtx, vars, varsResolver, selector, themeName, headless }),
    ...rootSelector === selector ? resolveStyle.resolveStyle({ style, theme }) : null,
    ...resolveStyle.resolveStyle({ style: options == null ? void 0 : options.style, theme })
  };
}
exports.getStyle = getStyle;
