import { __exports as u } from "../../../../../../../_virtual/generateVariantFunction.js";
import "../../../../../lodash@4.17.21/node_modules/lodash/lodash.js";
import p from "../../../../../postcss@8.4.14/node_modules/postcss/lib/postcss.js";
import "../../../../../postcss-selector-parser@6.0.10/node_modules/postcss-selector-parser/dist/index.js";
import "./useMemo.js";
import { __exports as c } from "../../../../../../../_virtual/useMemo.js";
import { l as i } from "../../../../../../../_virtual/lodash.js";
import { d as f } from "../../../../../../../_virtual/index30.js";
Object.defineProperty(u, "__esModule", {
  value: !0
});
u.default = x;
var d = s(i.exports), _ = s(p), v = s(f.exports), M = c;
function s(e) {
  return e && e.__esModule ? e : { default: e };
}
const g = (0, v.default)((e) => e.first.filter(({
  type: t
}) => t === "class").pop().value), h = (0, M.useMemo)((e) => g.transformSync(e), (e) => e);
function x(e, t = {}) {
  return {
    options: t,
    handler: (a, l) => {
      const r = _.default.root({
        nodes: a.clone().nodes
      });
      a.before(d.default.defaultTo(e({
        container: r,
        separator: l.separator,
        modifySelectors: (m) => (r.each((o) => {
          o.type === "rule" && (o.selectors = o.selectors.map((n) => m({
            get className() {
              return h(n);
            },
            selector: n
          })));
        }), r)
      }), r).nodes);
    }
  };
}
//# sourceMappingURL=generateVariantFunction.js.map
