'use strict';
var __importDefault = (this && this.__importDefault) || function (mod) {
    return (mod && mod.__esModule) ? mod : { "default": mod };
};
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;
};
Object.defineProperty(exports, "__esModule", { value: true });
require("../../stylesheets/attachments/fields.scss");
const classnames_1 = __importDefault(require("classnames"));
const React = __importStar(require("react"));
const emoji_1 = __importDefault(require("../../utils/emoji"));
const Field = ({ short, title, value, parser }) => (React.createElement("div", { className: classnames_1.default({
        field: true,
        'field--long': !short
    }) },
    React.createElement("div", { className: "field__title", dangerouslySetInnerHTML: { __html: emoji_1.default.toImage(title) } }),
    React.createElement("div", { className: "field__value", dangerouslySetInnerHTML: { __html: parser(value) } })));
const Fields = ({ fields, parser }) => (React.createElement("div", { className: "fields" }, fields.map((field, idx) => React.createElement(Field, Object.assign({ key: idx, parser: parser }, field)))));
exports.default = Fields;
//# sourceMappingURL=Fields.js.map