import { Box, IconButton, PopoverMenu, TableListItem, Text, Tooltip, } from '@wix/design-system';
import React, { useMemo } from 'react';
import { DeleteSmall, MoreSmall, UndoSmall } from '@wix/wix-ui-icons-common';
import { useWixPatternsContainer } from '@wix/bex-core/react';
function _ArchivedItemsListItem({ item, showDivider, onRestore, onDelete, dataHook = 'custom-columns', }) {
    const { translate: t } = useWixPatternsContainer();
    const style = useMemo(() => ({
        padding: '0 6px',
        wordBreak: 'break-word',
    }), []);
    const moreActionsButton = (React.createElement(PopoverMenu, { textSize: "small", placement: "bottom-end", dataHook: `${dataHook}-archived-item-options-${item.id}`, triggerElement: React.createElement(Tooltip, { content: t('cairo.archivedFields.more-actions.tooltip') },
            React.createElement(IconButton, { size: "tiny", dataHook: `${dataHook}-archived-item-options-trigger`, skin: "light" },
                React.createElement(MoreSmall, null))) },
        React.createElement(PopoverMenu.MenuItem, { dataHook: `${dataHook}-archived-item-options-restore`, prefixIcon: React.createElement(UndoSmall, null), text: t('cairo.archivedFields.more-actions.restore'), onClick: () => onRestore(item) }),
        React.createElement(PopoverMenu.MenuItem, { dataHook: `${dataHook}-archived-item-options-delete`, prefixIcon: React.createElement(DeleteSmall, null), text: t('cairo.archivedFields.more-actions.delete'), onClick: () => onDelete(item) })));
    return (React.createElement(TableListItem, { showDivider: showDivider, "data-hook": `${dataHook}-archived-item-${item.id}`, options: [
            {
                value: (React.createElement(Box, null,
                    React.createElement("div", { style: style },
                        React.createElement(Text, { size: "small", dataHook: `${dataHook}-archived-item-label` }, item.label || item.id)))),
            },
            {
                value: moreActionsButton,
                align: 'right',
            },
        ] }));
}
export const ArchivedItemsListItem = _ArchivedItemsListItem;
//# sourceMappingURL=ArchivedItemsListItem.js.map