"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.memberDeclaration = void 0;
const models_1 = require("../../../../models");
const utils_1 = require("../../../../utils");
const lib_1 = require("../../lib");
const memberDeclaration = (context, props) => (utils_1.JSX.createElement(utils_1.JSX.Fragment, null,
    utils_1.JSX.createElement("div", { class: "tsd-signature tsd-kind-icon" },
        (0, lib_1.wbr)(props.name),
        (0, lib_1.renderTypeParametersSignature)(props.typeParameters),
        props.type && (utils_1.JSX.createElement(utils_1.JSX.Fragment, null,
            utils_1.JSX.createElement("span", { class: "tsd-signature-symbol" },
                !!props.flags.isOptional && "?",
                ":"),
            " ",
            context.type(props.type))),
        !!props.defaultValue && props.kind !== models_1.ReflectionKind.EnumMember && (utils_1.JSX.createElement(utils_1.JSX.Fragment, null,
            utils_1.JSX.createElement("span", { class: "tsd-signature-symbol" },
                " = ",
                props.defaultValue)))),
    context.memberSources(props),
    context.comment(props),
    !!props.typeParameters && (utils_1.JSX.createElement(utils_1.JSX.Fragment, null,
        utils_1.JSX.createElement("h4", { class: "tsd-type-parameters-title" }, "Type Parameters"),
        context.typeParameters(props.typeParameters))),
    props.type instanceof models_1.ReflectionType && (utils_1.JSX.createElement("div", { class: "tsd-type-declaration" },
        utils_1.JSX.createElement("h4", null, "Type declaration"),
        context.parameter(props.type.declaration)))));
exports.memberDeclaration = memberDeclaration;
