import { UniDriver } from '@wix/wix-ui-test-utils/unidriver';
import {
  SectionHeaderUniDriver,
  TextButtonUniDriver,
  CounterBadgeUniDriver,
  IconButtonUniDriver,
} from '@wix/design-system/dist/testkit/unidriver';

export function CollectionSectionHeaderUniDriver(
  base: UniDriver,
  body: UniDriver,
) {
  return {
    ...SectionHeaderUniDriver(base, body),
    getPrimaryAction: () =>
      TextButtonUniDriver(
        base.$('[data-hook="collection-section-header-primary-action"]'),
        body,
      ),
    getBadge: () =>
      CounterBadgeUniDriver(base.$('[data-hook="section-header-badge"]'), body),
    getCollapseAction: () =>
      IconButtonUniDriver(
        base.$('[data-hook="collection-section-header-collapse-action"]'),
        body,
      ),
  };
}
