import { Injectable, NotFoundException, ForbiddenException } from '@nestjs/common';
import { UserService } from '../user/user.service';
import { TenantService } from '../tenant/tenant.service';

@Injectable()
export class AdminService {
    constructor(
        private readonly userService: UserService,
        private readonly tenantService: TenantService,
    ) { }

    async getTenantUsers(tenantId: string) {
        return this.userService.findByTenantId(tenantId);
    }

    async getTenantSettings(tenantId: string) {
        return this.tenantService.getSettings(tenantId);
    }

    async updateTenantSettings(tenantId: string, data: any) {
        return this.tenantService.updateSettings(tenantId, data);
    }

    // Notebook sharing approval and model assignments would go here
    async getPendingShares(tenantId: string) {
        // Mock implementation for pending shares to satisfy UI.
        // Needs proper schema/entity support in the future.
        return [];
    }
}
