import { __assign } from "tslib";
import { withThemeableProps } from '../../useThemeable';
import { classNamesFunction } from '@uifabric-vue/utilities';
import Vue from 'vue';
var getClassNames = classNamesFunction();
export var LinkBase = Vue.extend({
    name: 'LinkBase',
    functional: true,
    props: __assign(__assign({}, withThemeableProps()), { as: { type: String, default: undefined }, underline: { type: Boolean, default: false }, disabled: { type: Boolean, default: false }, href: { type: String, default: '' }, target: { type: String, default: undefined } }),
    render: function (h, ctx) {
        var _a = ctx.props, as = _a.as, target = _a.target, theme = _a.theme, className = _a.className, styles = _a.styles, href = _a.href, disabled = _a.disabled, underline = _a.underline;
        var classNames = getClassNames(styles, {
            theme: theme,
            className: className,
            isButton: !href,
            isDisabled: disabled,
            isUnderlined: underline,
        });
        var rootType = as || (href ? 'a' : 'button');
        return h(rootType, __assign(__assign({}, ctx.data), { class: classNames.root, attrs: __assign(__assign(__assign({}, rootType === 'a' && {
                target: target,
                href: disabled ? undefined : href,
            }), rootType === 'button' && {
                type: 'button',
                disabled: disabled,
            }), ctx.data.attrs) }), ctx.children);
    },
});
//# sourceMappingURL=Link.base.js.map