import { WatermarksListingScreenComponent } from './watermarks-listing/watermarks-listing-screen.component';
import { CompositeRouteGuard, IqserRoutes } from '@iqser/common-ui';
import { IqserAuthGuard } from '@common-ui/users';
import { RedRoleGuard } from '@users/red-role.guard';
import { WatermarkScreenComponent } from './watermark-screen/watermark-screen.component';
import { WATERMARK_ID } from '@red/domain';
import { watermarkExistsGuard } from '@guards/watermark-exists.guard';

export default [
    {
        path: '',
        component: WatermarksListingScreenComponent,
        canActivate: [CompositeRouteGuard],
        data: {
            routeGuards: [IqserAuthGuard, RedRoleGuard],
        },
    },
    {
        path: 'create',
        component: WatermarkScreenComponent,
        canActivate: [CompositeRouteGuard],
        data: {
            routeGuards: [IqserAuthGuard, RedRoleGuard],
        },
    },
    {
        path: `:${WATERMARK_ID}`,
        component: WatermarkScreenComponent,
        canActivate: [CompositeRouteGuard, watermarkExistsGuard()],
        data: {
            routeGuards: [IqserAuthGuard, RedRoleGuard],
        },
    },
] satisfies IqserRoutes;
