"use strict";
var __importDefault = (this && this.__importDefault) || function (mod) {
    return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.ViewMoreToggle = void 0;
var react_1 = __importDefault(require("react"));
var ui_i18n_1 = __importDefault(require("ui-i18n"));
var classnames_1 = __importDefault(require("classnames"));
var Link_1 = __importDefault(require("@mui/material/Link"));
var ExpandMore_1 = __importDefault(require("@mui/icons-material/ExpandMore"));
var ExpandLess_1 = __importDefault(require("@mui/icons-material/ExpandLess"));
var styles_1 = require("./styles");
var ViewMoreToggle = function (_a) {
    var active = _a.active, onClick = _a.onClick, className = _a.className;
    var styles = (0, styles_1.useStyles)();
    var Icon = active ? ExpandLess_1.default : ExpandMore_1.default;
    return (react_1.default.createElement(Link_1.default, { className: (0, classnames_1.default)(styles.link, className), onClick: onClick, underline: "none" },
        react_1.default.createElement(Icon, { className: styles.icon }),
        active ? ui_i18n_1.default.text('View less') : ui_i18n_1.default.text('View more')));
};
exports.ViewMoreToggle = ViewMoreToggle;
