import { Transmit } from '@adonisjs/transmit-client';
import { Service } from '../core/Service.js';
export default class TransmitService extends Service {
    static key = 'api-service/transmit';
    transmit;
    url;
    /**
     * @param url - The URL of the API server.
     */
    constructor(url) {
        super();
        this.url = url;
    }
    async onCreate() {
        this.transmit = new Transmit({
            baseUrl: this.url,
        });
    }
    async onDestroy() {
        this.transmit?.close();
    }
}
//# sourceMappingURL=TransmitService.js.map