import { UniDriver } from '@wix/wix-ui-test-utils/unidriver';
import { baseUniDriverFactory } from '../../unidriver';
import { PageHeaderUniDriver } from '@wix/design-system/dist/testkit/unidriver';
import { FormPageContentUniDriver } from '../FormPageContent/FormPageContent.uni.driver';

export const SettingsPageUniDriver = (base: UniDriver, body: UniDriver) => {
  const formPageContentUniDriver = FormPageContentUniDriver(base, body);

  return {
    /** Returns page header driver */
    getPageHeader: () =>
      PageHeaderUniDriver(base.$(`[data-hook="settings-page-header"]`), body),
    ...formPageContentUniDriver,
    ...baseUniDriverFactory(base),
  };
};
