import { ComponentHarness, ContentContainerComponentHarness } from '@angular/cdk/testing';
export * from '@angular/cdk/testing';
import { PButtonDirectiveHarness, ContentContainerComponentHarness as ContentContainerComponentHarness$1, DivHarness, PHarness } from '@onecx/angular-testing';
export * from '@onecx/angular-testing';
export * from '@angular/cdk/testing/testbed';
export * from '@onecx/angular-accelerator/testing';

class DialogMessageContentHarness extends ComponentHarness {
    constructor() {
        super(...arguments);
        this.getMessageSpan = this.locatorFor('#dialogMessage');
        this.getIcon = this.locatorForOptional('i');
    }
    static { this.hostSelector = '.dialogMessageContent'; }
    async getMessageContent() {
        return await (await this.getMessageSpan()).text();
    }
    async getIconValue() {
        return await (await this.getIcon())?.getAttribute('class');
    }
}

class ButtonDialogHarness extends ContentContainerComponentHarness {
    constructor() {
        super(...arguments);
        this.getPrimaryButton = this.locatorFor(PButtonDirectiveHarness.with({ id: 'buttonDialogPrimaryButton' }));
        this.getSecondaryButton = this.locatorForOptional(PButtonDirectiveHarness.with({ id: 'buttonDialogSecondaryButton' }));
        this.getDialogMessageContent = this.locatorForOptional(DialogMessageContentHarness);
    }
    static { this.hostSelector = 'ocx-button-dialog'; }
    async clickPrimaryButton() {
        await (await this.getPrimaryButton()).click();
    }
    async clickSecondaryButton() {
        await (await this.getSecondaryButton())?.click();
    }
    async getPrimaryButtonLabel() {
        return await (await this.getPrimaryButton()).getLabel();
    }
    async getPrimaryButtonIcon() {
        return await (await this.getPrimaryButton()).getIcon();
    }
    async getSecondaryButtonLabel() {
        return await (await this.getSecondaryButton())?.getLabel();
    }
    async getSecondaryButtonIcon() {
        return await (await this.getSecondaryButton())?.getIcon();
    }
    async getPrimaryButtonDisabled() {
        return await (await this.getPrimaryButton()).getDisabled();
    }
    async getSecondaryButtonDisabled() {
        return await (await this.getSecondaryButton())?.getDisabled();
    }
}

class DialogContentHarness extends ContentContainerComponentHarness$1 {
    constructor() {
        super(...arguments);
        this.getDialogMessageContent = this.locatorForOptional(DialogMessageContentHarness);
    }
    static { this.hostSelector = 'ocx-dialog-content'; }
}

class DialogFooterHarness extends ContentContainerComponentHarness$1 {
    constructor() {
        super(...arguments);
        this.getPrimaryButton = this.locatorFor(PButtonDirectiveHarness.with({ id: 'buttonDialogPrimaryButton' }));
        this.getSecondaryButton = this.locatorForOptional(PButtonDirectiveHarness.with({ id: 'buttonDialogSecondaryButton' }));
    }
    static { this.hostSelector = 'ocx-dialog-footer'; }
    async clickPrimaryButton() {
        await (await this.getPrimaryButton()).click();
    }
    async clickSecondaryButton() {
        await (await this.getSecondaryButton())?.click();
    }
    async getPrimaryButtonLabel() {
        return await (await this.getPrimaryButton()).getLabel();
    }
    async getPrimaryButtonIcon() {
        return await (await this.getPrimaryButton()).getIcon();
    }
    async getSecondaryButtonLabel() {
        return await (await this.getSecondaryButton())?.getLabel();
    }
    async getSecondaryButtonIcon() {
        return await (await this.getSecondaryButton())?.getIcon();
    }
    async getPrimaryButtonDisabled() {
        return await (await this.getPrimaryButton()).getDisabled();
    }
    async getSecondaryButtonDisabled() {
        return await (await this.getSecondaryButton())?.getDisabled();
    }
}

class DialogInlineHarness extends ContentContainerComponentHarness$1 {
    constructor() {
        super(...arguments);
        this.getDialogContent = this.locatorFor(DialogContentHarness);
        this.getDialogFooter = this.locatorFor(DialogFooterHarness);
    }
    static { this.hostSelector = 'ocx-dialog-inline'; }
}

class OcxContentContainerHarness extends ComponentHarness {
    static { this.hostSelector = 'ocx-content-container'; }
    async getLayoutClasses() {
        const div = await this.locatorFor(DivHarness)();
        const actualClassList = await div.getClassList();
        return actualClassList;
    }
    async getLayout() {
        const layoutClassses = await this.getLayoutClasses();
        return layoutClassses.find((c) => c.endsWith(':flex-row')) ? 'horizontal' : 'vertical';
    }
    async getBreakpoint() {
        const layoutClassses = await this.getLayoutClasses();
        const layoutClass = layoutClassses.find((c) => c.endsWith(':flex-row'));
        return layoutClass?.split(':')[0];
    }
}

class OcxContentHarness extends ComponentHarness {
    static { this.hostSelector = 'ocx-content'; }
    async getContentClasses() {
        const div = await this.locatorFor(DivHarness)();
        const actualClassList = await div.getClassList();
        return actualClassList;
    }
    async getTitleClasses(titleElementId) {
        const p = await this.getTitleHarness(titleElementId);
        if (p) {
            const actualClassList = await p.getClassList();
            return actualClassList;
        }
        return null;
    }
    async getTitle(titleElementId) {
        const p = await this.getTitleHarness(titleElementId);
        if (p) {
            const titleContent = await p.getText();
            return titleContent;
        }
        return null;
    }
    async getTitleHarness(titleElementId) {
        const pHarness = await this.locatorForOptional(PHarness.with({ id: titleElementId }))();
        return pHarness;
    }
    async hasTitle(titleElementId) {
        const title = await this.getTitleHarness(titleElementId);
        return !!title;
    }
}

class LifecycleHarness extends ContentContainerComponentHarness {
    constructor() {
        super(...arguments);
        this.getSteps = this.locatorForAll('.p-timeline-event-content .card');
        this.getHighlightedSteps = this.locatorForAll('.p-timeline-event-content .card.bg-primary');
    }
    static { this.hostSelector = 'ocx-lifecycle'; }
}

/**
 * Generated bundle index. Do not edit.
 */

export { ButtonDialogHarness, DialogContentHarness, DialogFooterHarness, DialogInlineHarness, DialogMessageContentHarness, LifecycleHarness, OcxContentContainerHarness, OcxContentHarness };
//# sourceMappingURL=onecx-portal-integration-angular-testing.mjs.map
