import { Eq, Pnode, Pprint, Testable } from '@ephox/dispute';
import * as Html from '../properties/Html';
import type { SugarElement } from './SugarElement';
type EqType = Eq.Eq;
type PprintType = Pprint.Pprint;
type TestableType = Testable.Testable;
export const eqElement = (): EqType> =>
Eq.contramap(Eq.tripleEq, (e) => e.dom);
export const pprintElement = (): PprintType> =>
Pprint.pprint>((e) => Pnode.single(Html.getOuter(e)));
export const tElement = (): TestableType> =>
Testable.testable(eqElement(), pprintElement());