"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.loadVideoByUrl = exports.loadVideo = void 0;
const video_1 = require("../../models/video/video");
function loadVideo(id, fetchType, userId) {
    if (fetchType === 'for-api')
        return video_1.VideoModel.loadForGetAPI({ id, userId });
    if (fetchType === 'all')
        return video_1.VideoModel.loadFull(id, undefined, userId);
    if (fetchType === 'only-immutable-attributes')
        return video_1.VideoModel.loadImmutableAttributes(id);
    if (fetchType === 'only-video')
        return video_1.VideoModel.load(id);
    if (fetchType === 'id' || fetchType === 'none')
        return video_1.VideoModel.loadOnlyId(id);
}
exports.loadVideo = loadVideo;
function loadVideoByUrl(url, fetchType) {
    if (fetchType === 'all')
        return video_1.VideoModel.loadByUrlAndPopulateAccount(url);
    if (fetchType === 'only-immutable-attributes')
        return video_1.VideoModel.loadByUrlImmutableAttributes(url);
    if (fetchType === 'only-video')
        return video_1.VideoModel.loadByUrl(url);
}
exports.loadVideoByUrl = loadVideoByUrl;
//# sourceMappingURL=video.js.map