import { RequestRetryOptions } from "../common.js";
import { CommonClientConfig, CommonClientData } from "./index.js";
import { LastfmClientOptions } from "./lastfm.js";

export interface LibrefmData extends CommonClientData, RequestRetryOptions {
        /**
         * Optional Secret for Libre.fm account
         * 
         * This can be anything, or it will be generated by multi-scrobbler
         *
         * @examples ["anyValue"]
         * */
        apiKey?: string
        /**
         * Optional Secret for Libre.fm account
         * 
         * This can be anything, or it will be generated by multi-scrobbler
         *
         * @examples ["anyValue"]
         * */
        secret?: string

            /**
         * Optional session id returned from a completed auth flow
         * */
        session?: string

        path?: string

        /** 
         * (Optional) The host and path prefix for your Libre.fm instance
         * 
         * @default 'https://libre.fm/2.0/'
        */
        urlBase?: string
        /**
         * Optional URI to use for callback. Specify this if callback should be different than the default. MUST have "librefm/callback" in the URL somewhere.
         *
         * @default "http://localhost:9078/librefm/callback"
         * @examples ["http://localhost:9078/librefm/callback"]
         * */
        redirectUri?: string
}

export interface LibrefmClientOptions extends LastfmClientOptions {

}

export interface LibrefmClientConfig extends CommonClientConfig {
    /**
     * Should always be `client` when using Librefm as a client
     *
     * @default client
     * @examples ["client"]
     * */
    configureAs?: 'client' | 'source'
    data: LibrefmData
    options?: LibrefmClientOptions
}

export interface LibrefmClientAIOConfig extends LibrefmClientConfig {
    type: 'librefm'
}