import { ShortenUrlRequest, ShortenUrlResponse } from "./types";

export async function shortenUrlApi(
    payload: ShortenUrlRequest
): Promise<ShortenUrlResponse> {
    /* TODO

    const response = await fetch('https://api.minxa.lol/api/v1/url', {
        method: 'POST',
        headers: { 'Content-Type': 'application/json' },
        body: JSON.stringify(payload),
    });

    if (!response.ok) {
        throw new Error('Failed to shorten URL');
    }

    */

    return {
        shortCode: 'Ux5vy' // Dummy value return
    }
}