"use strict";
var __importStar = (this && this.__importStar) || function (mod) {
    if (mod && mod.__esModule) return mod;
    var result = {};
    if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k];
    result["default"] = mod;
    return result;
};
var __importDefault = (this && this.__importDefault) || function (mod) {
    return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
const path = __importStar(require("path"));
const React = __importStar(require("react"));
const react_jss_1 = __importDefault(require("react-jss"));
const classNames = require("classnames");
const styles = (theme) => ({
    icon: {
        width: ((props) => props.width || props.size),
        height: ((props) => props.height || props.size),
        fill: ((props) => props.color || theme.icons.color.base),
    },
});
class IconImpl extends React.PureComponent {
    render() {
        const { classes, symbolId } = this.props;
        const svgProps = Object.assign({}, this.props);
        [
            'classes', 'symbolId', 'width', 'height', 'size', 'color', 'className', 'sheet', 'theme',
        ].forEach(prop => {
            if (prop in svgProps)
                delete svgProps[prop];
        });
        return (React.createElement("svg", Object.assign({ className: classNames(classes.icon, this.props.className) }, svgProps),
            React.createElement("use", { xlinkHref: getIconHref(symbolId) })));
    }
}
exports.IconImpl = IconImpl;
const STATIC_PATH = path.join(__dirname, '../../../static');
function getIconHref(symbolId) {
    return path.join(STATIC_PATH, `Icons.svg#icon--${symbolId}`);
}
exports.Icon = react_jss_1.default(styles)(IconImpl);
var IconSymbol;
(function (IconSymbol) {
    IconSymbol["APP_ICON_PLACEHOLDER"] = "app-icon-placeholder";
    IconSymbol["CHAT"] = "chat";
    IconSymbol["CHECKMARK"] = "checkmark";
    IconSymbol["CROSS"] = "cross";
    IconSymbol["DETACH"] = "detach";
    IconSymbol["DOWNLOAD"] = "download";
    IconSymbol["FOCUS"] = "focus";
    IconSymbol["MARK_READ"] = "mark-read";
    IconSymbol["NAV_BACK"] = "nav-back";
    IconSymbol["NAV_FORTH"] = "nav-forth";
    IconSymbol["NOTIFICATION"] = "notification";
    IconSymbol["PLUS"] = "plus";
    IconSymbol["QUICK_SEARCH"] = "quick-search";
    IconSymbol["REATTACH"] = "reattach";
    IconSymbol["SEARCH"] = "search";
    IconSymbol["SHOW"] = "show";
    IconSymbol["STAR"] = "star";
    IconSymbol["SUBVIEW_COPIED"] = "subview-copied";
    IconSymbol["SUBVIEW_COPY"] = "subview-copy";
    IconSymbol["SUBVIEW_MINIMIZE"] = "subview-minimize";
    IconSymbol["SUBVIEW_OPEN"] = "subview-open";
    IconSymbol["TIME"] = "time";
    IconSymbol["TRASH"] = "trash";
    IconSymbol["USER"] = "user";
    IconSymbol["USER_ADD"] = "user-add";
    IconSymbol["COG"] = "cog";
    IconSymbol["UNHAPPY"] = "unhappy";
    IconSymbol["DOC"] = "doc";
    IconSymbol["SHEET"] = "sheet";
    IconSymbol["SLIDE"] = "slide";
    IconSymbol["UPDATE"] = "update";
    IconSymbol["HEARTFILLED"] = "heartfilled";
    IconSymbol["HEARTSTROKE"] = "heartstroke";
    IconSymbol["LIFEBOAT"] = "lifeboat";
    IconSymbol["NUDGE"] = "nudge";
    IconSymbol["BELL"] = "bell";
    IconSymbol["BELL_OFF"] = "bell-off";
    IconSymbol["ARROW_LEFT"] = "arrow-left";
    IconSymbol["ARROW_DOWN_LEFT"] = "arrow-down-left";
    IconSymbol["ARROW_RIGHT"] = "arrow-right";
    IconSymbol["LOADING"] = "loading";
    IconSymbol["EXTENSION"] = "extension";
    IconSymbol["SUPPORT"] = "support";
    IconSymbol["TEXT"] = "text";
    IconSymbol["SEND"] = "send";
    IconSymbol["HINT"] = "hint";
    IconSymbol["RETURN"] = "return";
    IconSymbol["RECENT"] = "recent";
    IconSymbol["RECENT_ARROW"] = "recent-arrow";
    IconSymbol["PIN"] = "pin";
    IconSymbol["BURGER"] = "burger";
    IconSymbol["PENCIL"] = "pencil";
    IconSymbol["LOCK"] = "lock";
})(IconSymbol = exports.IconSymbol || (exports.IconSymbol = {}));
//# sourceMappingURL=index.js.map