import { CollectionPageState, WixPatternsContainer } from '@wix/bex-core';
import { MoreActionsItem } from '../MoreActions';
import { TagSmall } from '@wix/wix-ui-icons-common';
import React from 'react';

export function manageTagsPageAction({
  pageState,
  container,
}: {
  pageState: CollectionPageState;
  container: WixPatternsContainer;
}): MoreActionsItem {
  const { translate: t } = container;
  return {
    biName: 'manage-tags',
    dataHook: 'manage-tags',
    text: t('cairo.tags.collectionPage.tagsColumn.manage.CTA'),
    prefixIcon: <TagSmall />,
    onClick: () => {
      pageState.primaryToolbar?.tagsCollectionState?.openManageTagsModal();
    },
  };
}
