import { NgModule } from '@angular/core';
import { CommonModule } from '@angular/common';
import { RouterModule, Routes } from '@angular/router';
import { SharedModule } from 'src/app/modules/shared/shared.module';
import { UserSpacesDataService } from 'src/app/modules/admin/user-spaces/user-spaces.data.service';
import { UserSpaceFormPageComponent } from 'src/app/modules/admin/user-spaces/form-page/user-space-form-page.component';

const routes: Routes = [
  {
    path: 'create',
    component: UserSpaceFormPageComponent,
  },
  {
    path: 'edit/:id',
    component: UserSpaceFormPageComponent,
  },
];

@NgModule({
  declarations: [UserSpaceFormPageComponent],
  imports: [CommonModule, SharedModule, RouterModule.forChild(routes)],
  providers: [UserSpacesDataService.provide()],
})
export class UserSpacesModule {}
