import { getId } from "../../utils/helpers";
export const MockData = [{
        url: '/services/media/gallery',
        method: 'GET',
        status: 200,
        response: (request) => {
            var _a;
            const page = (_a = parseInt(request.searchParams.page)) !== null && _a !== void 0 ? _a : 1;
            const data = Array(page == 1 ? 9 : 10).fill('image').map((value, index) => ({
                uuid: getId(value),
                url: `https://picsum.photos/100/100.jpg?random=${index + (page * 10)}`,
                type: 'image'
            }));
            return {
                success: true,
                data: {
                    items: data,
                    has_more: 3 > page,
                    total: 29
                }
            };
        },
    }, {
        url: '/services/media/gallery',
        method: 'POST',
        status: 200,
        response: (request) => {
            const body = request.body;
            const file = body.get('image');
            return {
                success: true,
                data: {
                    uuid: getId('image'),
                    url: URL.createObjectURL(file),
                    type: 'image',
                }
            };
        },
    }, {
        url: '/services/media/gallery',
        method: 'DELETE',
        status: 200,
        response: (request) => {
            var _a;
            return {
                success: true,
                data: {
                    uuid: (_a = request.searchParams.uuid) !== null && _a !== void 0 ? _a : '',
                }
            };
        },
    }, {
        url: '/services/media/generate',
        method: 'GET',
        status: 200,
        response: () => {
            const data = Array(9).fill('image').map((value, index) => ({
                uuid: getId(value),
                url: `https://picsum.photos/100/100.jpg?random=${index + 1}`,
                type: 'image'
            }));
            return {
                success: true,
                data: {
                    items: data,
                    total: 19
                }
            };
        },
    }, {
        url: '/services/media/generate',
        method: 'POST',
        status: 200,
        response: (request) => {
            const body = request.body;
            return {
                success: true,
                data: {
                    uuid: getId('image'),
                    url: `https://picsum.photos/100/100.jpg?random=${Math.floor(Math.random() * 100) + 1}`,
                    type: 'image',
                    prompt: body.get('prompt')
                }
            };
        },
    }];
