import React from 'react';
import { Button } from '@wix/design-system';
import { ChevronDown } from '@wix/wix-ui-icons-common';
import { observer } from 'mobx-react-lite';
import { MoreActionsBase } from './MoreActionsBase';
import { useWixPatternsContainer } from '@wix/bex-core/react';
import { MoreActionsProps } from './MoreActionsProps';

export interface MoreActionsTextProps extends MoreActionsProps {}

function _MoreActionsText(params: MoreActionsTextProps) {
  const { translate: t } = useWixPatternsContainer();

  return (
    <MoreActionsBase
      {...params}
      triggerElement={
        <Button
          skin="standard"
          priority="secondary"
          dataHook="more-actions-popover-button"
          suffixIcon={<ChevronDown />}
        >
          {t('cairo.moreActions')}
        </Button>
      }
    />
  );
}

export const MoreActionsText = observer(_MoreActionsText);
