import { __exports as e } from "../../../../../../../_virtual/formatters.js";
import { __exports as g } from "../../../../../../../_virtual/formatters.js";
import { __require as s } from "../../../../../@babel_types@7.18.7/node_modules/@babel/types/lib/index.js";
Object.defineProperty(e, "__esModule", {
  value: !0
});
e.statements = e.statement = e.smart = e.program = e.expression = void 0;
var a = s();
const {
  assertExpressionStatement: m
} = a;
function n(t) {
  return {
    code: (r) => `/* @babel/template */;
${r}`,
    validate: () => {
    },
    unwrap: (r) => t(r.program.body.slice(1))
  };
}
const u = n((t) => t.length > 1 ? t : t[0]);
e.smart = u;
const i = n((t) => t);
e.statements = i;
const p = n((t) => {
  if (t.length === 0)
    throw new Error("Found nothing to return.");
  if (t.length > 1)
    throw new Error("Found multiple statements but wanted one");
  return t[0];
});
e.statement = p;
const o = {
  code: (t) => `(
${t}
)`,
  validate: (t) => {
    if (t.program.body.length > 1)
      throw new Error("Found multiple statements but wanted one");
    if (o.unwrap(t).start === 0)
      throw new Error("Parse result included parens.");
  },
  unwrap: ({
    program: t
  }) => {
    const [r] = t.body;
    return m(r), r.expression;
  }
};
e.expression = o;
const l = {
  code: (t) => t,
  validate: () => {
  },
  unwrap: (t) => t.program
};
e.program = l;
export {
  g as default
};
//# sourceMappingURL=formatters.js.map
