"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.default = ItalicText;
const tslib_1 = require("tslib");
const list_marker_format_1 = require("./list-marker-format");
const lexical_1 = require("lexical");
const react_1 = tslib_1.__importDefault(require("react"));
const types_1 = require("../../../../types");
function ItalicText({ editor, isActive }) {
    return (react_1.default.createElement("div", { className: 'flex items-center gap-x-2' },
        react_1.default.createElement("button", { type: 'button', "data-color-button": 'true', className: (0, types_1.classNames)('p-1 rounded-md duration-200 cursor-pointer', isActive ? 'bg-gray-200' : 'hover:bg-gray-200'), onClick: () => {
                (0, list_marker_format_1.syncListMarkerFormatStyle)(editor, { 'font-style': isActive ? null : 'italic' });
                editor.dispatchCommand(lexical_1.FORMAT_TEXT_COMMAND, 'italic');
            } },
            react_1.default.createElement("span", null,
                react_1.default.createElement("svg", { width: '20', height: '20', viewBox: '0 0 20 20', fill: 'none', xmlns: 'http://www.w3.org/2000/svg' },
                    react_1.default.createElement("path", { d: 'M7.5 4.25C7.5 3.83579 7.83579 3.5 8.25 3.5H14.25C14.6642 3.5 15 3.83579 15 4.25C15 4.66421 14.6642 5 14.25 5H11.9055L9.6328 15H11.75C12.1642 15 12.5 15.3358 12.5 15.75C12.5 16.1642 12.1642 16.5 11.75 16.5H5.75C5.33579 16.5 5 16.1642 5 15.75C5 15.3358 5.33579 15 5.75 15H8.09455L10.3673 5H8.25C7.83579 5 7.5 4.66421 7.5 4.25Z', fill: '#4A4A4A' }))))));
}
//# sourceMappingURL=italic-text.js.map