import { Controller, Get, UseGuards } from '@nestjs/common';
import { OptionalAuthGuard } from 'src/jwt-auth/optional-auth.guard';
import { SelectOptionsService } from './select-options.service';

@Controller('select-options')
export class SelectOptionsController {
  constructor(private selectOptionsService: SelectOptionsService) {}

  @UseGuards(OptionalAuthGuard)
  @Get()
  getSelectOption(): any {
    return {
      typesOfBusiness: this.selectOptionsService.typesOfBusiness,
      prices: this.selectOptionsService.prices,
      listingCategories: this.selectOptionsService.listingCategories,
      customerTypes: this.selectOptionsService.customerTypes,
      locations: this.selectOptionsService.locations,
      typesOfCommercialProperty: this.selectOptionsService.typesOfCommercialProperty,
      customerSubTypes: this.selectOptionsService.customerSubTypes,
      distances: this.selectOptionsService.distances,
      sortByOptions: this.selectOptionsService.sortByOptions,
    };
  }
}
