import {
  PopoverUniDriver,
  TextButtonUniDriver,
  TextUniDriver,
} from '@wix/design-system/dist/testkit/unidriver';
import {
  baseUniDriverFactory,
  UniDriver,
} from '@wix/wix-ui-test-utils/unidriver';

export default (base: UniDriver, body: UniDriver) => {
  const text = () =>
    TextUniDriver(base.$('[data-hook="request-id-value"]'), body);

  const popover = () =>
    PopoverUniDriver(body.$(`[data-hook="request-id-popover"]`), body);

  const description = () =>
    TextUniDriver(body.$('[data-hook="request-id-description"]'), body);

  const copyButton = () =>
    TextButtonUniDriver(body.$('[data-hook="request-id-copy-button"]'), body);

  return {
    ...baseUniDriverFactory(base),
    text,
    popover,
    description,
    copyButton,
  };
};
