import { API_URL } from '$utils/api'


/**
 * Get a Directus asset URL from parameters
 */
export const getAssetUrlKey = (
    id: string,
    key: string
) => {
    return `${API_URL}/assets/${id}?key=${key}`
}


/**
 * Get a Directus asset URL from parameters
 */
// export const getAssetUrl = (
//     id: string,
//     width: number,
//     height: number,
//     quality?: number,
//     fit: string = 'inside',
//     format?: string
// ) => {
//     let args = ''

//     // Add arguments to URL if specified
//     if (quality) args += `&quality=${quality}`
//     if (format) args += `&format=${format}`

//     return `${API_URL}/assets/${id}?width=${width}&height=${height}&fit=${fit}${args}`
// }