import { baseUniDriverFactory } from '../../utils/test-utils/unidriver';
export const avatarCoreDriverFactory = (base) => {
    const byDataHook = (dataHook) => dataHook ? base.$(`[data-hook="${dataHook}"]`) : base;
    return {
        ...baseUniDriverFactory(base),
        getAttribute: (attrName, dataHook) => {
            if (dataHook) {
                return base.$(`[data-hook="${dataHook}"`).attr(attrName);
            }
            return base.attr(attrName);
        },
        getProperty: propName => base.prop(propName),
        getContentType: () => base.attr('data-content-type'),
        getTextContent: dataHook => byDataHook(dataHook).text(),
        hasClass: (className, dataHook) => {
            return byDataHook(dataHook || 'content').hasClass(className);
        },
        isImageLoaded: async () => (await base.attr('data-img-loaded')) === 'true',
    };
};
//# sourceMappingURL=AvatarCore.uni.driver.js.map