import type { ShopUserRole } from "../enums.js"
import type { ShopUserPermissionKey, ShopUserPermissionOverrides } from "../permissions.js"
import type { StationListItemDto } from "./station.dto.js"

export interface ShopUserDetailDto {
    id: string
    shopId: string
    email: string
    displayName: string | null
    username: string
    role: ShopUserRole
    active: boolean
    mustChangePassword: boolean
    permissionOverrides: ShopUserPermissionOverrides
    effectivePermissions: ShopUserPermissionKey[]
    stations: StationListItemDto[]
    createdAt: string
}

export interface ShopUserListItemDto {
    id: string
    email: string
    displayName: string | null
    username: string
    role: ShopUserRole
    active: boolean
    mustChangePassword: boolean
    permissionOverrides: ShopUserPermissionOverrides
    effectivePermissions: ShopUserPermissionKey[]
    createdAt: string
}

/**
 * ShopUser enrichi avec les infos du shop — utilisé par GET /me/shop-users
 */
export interface ShopUserWithShopDto extends ShopUserListItemDto {
    shopId: string
    shopName: string
    active: boolean
}
