import { __exports as s } from "../../../../../../../../_virtual/jsx.js";
import { __require as t } from "./utils.js";
var i;
function l() {
  if (i)
    return s;
  i = 1;
  var e = t();
  const a = (0, e.defineAliasedType)("JSX");
  return a("JSXAttribute", {
    visitor: ["name", "value"],
    aliases: ["Immutable"],
    fields: {
      name: {
        validate: (0, e.assertNodeType)("JSXIdentifier", "JSXNamespacedName")
      },
      value: {
        optional: !0,
        validate: (0, e.assertNodeType)("JSXElement", "JSXFragment", "StringLiteral", "JSXExpressionContainer")
      }
    }
  }), a("JSXClosingElement", {
    visitor: ["name"],
    aliases: ["Immutable"],
    fields: {
      name: {
        validate: (0, e.assertNodeType)("JSXIdentifier", "JSXMemberExpression", "JSXNamespacedName")
      }
    }
  }), a("JSXElement", {
    builder: ["openingElement", "closingElement", "children", "selfClosing"],
    visitor: ["openingElement", "children", "closingElement"],
    aliases: ["Immutable", "Expression"],
    fields: Object.assign({
      openingElement: {
        validate: (0, e.assertNodeType)("JSXOpeningElement")
      },
      closingElement: {
        optional: !0,
        validate: (0, e.assertNodeType)("JSXClosingElement")
      },
      children: {
        validate: (0, e.chain)((0, e.assertValueType)("array"), (0, e.assertEach)((0, e.assertNodeType)("JSXText", "JSXExpressionContainer", "JSXSpreadChild", "JSXElement", "JSXFragment")))
      }
    }, {
      selfClosing: {
        validate: (0, e.assertValueType)("boolean"),
        optional: !0
      }
    })
  }), a("JSXEmptyExpression", {}), a("JSXExpressionContainer", {
    visitor: ["expression"],
    aliases: ["Immutable"],
    fields: {
      expression: {
        validate: (0, e.assertNodeType)("Expression", "JSXEmptyExpression")
      }
    }
  }), a("JSXSpreadChild", {
    visitor: ["expression"],
    aliases: ["Immutable"],
    fields: {
      expression: {
        validate: (0, e.assertNodeType)("Expression")
      }
    }
  }), a("JSXIdentifier", {
    builder: ["name"],
    fields: {
      name: {
        validate: (0, e.assertValueType)("string")
      }
    }
  }), a("JSXMemberExpression", {
    visitor: ["object", "property"],
    fields: {
      object: {
        validate: (0, e.assertNodeType)("JSXMemberExpression", "JSXIdentifier")
      },
      property: {
        validate: (0, e.assertNodeType)("JSXIdentifier")
      }
    }
  }), a("JSXNamespacedName", {
    visitor: ["namespace", "name"],
    fields: {
      namespace: {
        validate: (0, e.assertNodeType)("JSXIdentifier")
      },
      name: {
        validate: (0, e.assertNodeType)("JSXIdentifier")
      }
    }
  }), a("JSXOpeningElement", {
    builder: ["name", "attributes", "selfClosing"],
    visitor: ["name", "attributes"],
    aliases: ["Immutable"],
    fields: {
      name: {
        validate: (0, e.assertNodeType)("JSXIdentifier", "JSXMemberExpression", "JSXNamespacedName")
      },
      selfClosing: {
        default: !1
      },
      attributes: {
        validate: (0, e.chain)((0, e.assertValueType)("array"), (0, e.assertEach)((0, e.assertNodeType)("JSXAttribute", "JSXSpreadAttribute")))
      },
      typeParameters: {
        validate: (0, e.assertNodeType)("TypeParameterInstantiation", "TSTypeParameterInstantiation"),
        optional: !0
      }
    }
  }), a("JSXSpreadAttribute", {
    visitor: ["argument"],
    fields: {
      argument: {
        validate: (0, e.assertNodeType)("Expression")
      }
    }
  }), a("JSXText", {
    aliases: ["Immutable"],
    builder: ["value"],
    fields: {
      value: {
        validate: (0, e.assertValueType)("string")
      }
    }
  }), a("JSXFragment", {
    builder: ["openingFragment", "closingFragment", "children"],
    visitor: ["openingFragment", "children", "closingFragment"],
    aliases: ["Immutable", "Expression"],
    fields: {
      openingFragment: {
        validate: (0, e.assertNodeType)("JSXOpeningFragment")
      },
      closingFragment: {
        validate: (0, e.assertNodeType)("JSXClosingFragment")
      },
      children: {
        validate: (0, e.chain)((0, e.assertValueType)("array"), (0, e.assertEach)((0, e.assertNodeType)("JSXText", "JSXExpressionContainer", "JSXSpreadChild", "JSXElement", "JSXFragment")))
      }
    }
  }), a("JSXOpeningFragment", {
    aliases: ["Immutable"]
  }), a("JSXClosingFragment", {
    aliases: ["Immutable"]
  }), s;
}
export {
  l as __require
};
//# sourceMappingURL=jsx.js.map
