import { listTags, createTag, updateTag, deleteTag, listTagsForAccount, createTagForAccount, } from '@wix/bex-utils/@wix/ambassador-os-tags-v1-tag/http';
export const aTag = (overrides = {}) => {
    return {
        createdDate: new Date(),
        ...overrides,
    };
};
export const aTagsArray = (count) => Array.from({ length: count }, (_, index) => aTag({ id: String(index), name: `Tag ${index}` }));
export const tags = aTagsArray(2);
export function tagsServiceMocks(whenRequest) {
    return {
        mocks: [
            whenRequest(listTags)
                .reply(200, async () => {
                const data = {
                    tags,
                };
                return data;
            })
                .persist(),
            whenRequest(createTag)
                .reply(200, async ({ tag }) => {
                return { tag };
            })
                .persist(),
            whenRequest(updateTag)
                .reply(200, async (tag) => {
                return tag;
            })
                .persist(),
            whenRequest(deleteTag)
                .reply(200, () => { })
                .persist(),
            whenRequest(listTagsForAccount)
                .reply(200, async () => {
                const data = {
                    tags,
                };
                return data;
            })
                .persist(),
            whenRequest(createTagForAccount)
                .reply(200, async ({ tag }) => {
                return { tag };
            })
                .persist(),
        ],
    };
}
//# sourceMappingURL=tagsServiceMocks.js.map