import { Module } from '@nestjs/common';
import { ConfigModule, ConfigService } from '@nestjs/config';
import { JwtModule } from '@nestjs/jwt';
import { jwtConfig, DatabaseService } from '../../config';
import { JwtStrategy } from '../owner/strategies/jwt.strategy';
import { LocationsController } from './locations.controller';
import { LocationsService } from './locations.service';
import { PermissionResolverService } from '../../common/access-control/permission-resolver.service';

@Module({
  imports: [
    JwtModule.registerAsync({
      imports: [ConfigModule],
      inject: [ConfigService],
      useFactory: jwtConfig,
    }),
  ],
  controllers: [LocationsController],
  providers: [LocationsService, DatabaseService, JwtStrategy,PermissionResolverService],
})
export class LocationsModule {}
