export type Brand<T, B extends string> = T & { readonly __brand: B };

export type ProjectId = Brand<string, 'ProjectId'>;
export type SceneId = Brand<string, 'SceneId'>;
export type AssetId = Brand<string, 'AssetId'>;
export type GraphNodeId = Brand<string, 'GraphNodeId'>;
export type MaterialId = Brand<string, 'MaterialId'>;
export type NpcId = Brand<string, 'NpcId'>;
export type NpcRelationId = Brand<string, 'NpcRelationId'>;
export type NpcGroupId = Brand<string, 'NpcGroupId'>;
export type TokenId = Brand<string, 'TokenId'>;
export type SceneTokenId = Brand<string, 'SceneTokenId'>;
export type PlayerId = Brand<string, 'PlayerId'>;
export type PlayerTeamId = Brand<string, 'PlayerTeamId'>;
export type SceneNpcTokenId = Brand<string, 'SceneNpcTokenId'>;

export function asProjectId(value: string): ProjectId {
  return value as ProjectId;
}

export function asSceneId(value: string): SceneId {
  return value as SceneId;
}

export function asAssetId(value: string): AssetId {
  return value as AssetId;
}

export function asGraphNodeId(value: string): GraphNodeId {
  return value as GraphNodeId;
}

export function asMaterialId(value: string): MaterialId {
  return value as MaterialId;
}

export function asNpcId(value: string): NpcId {
  return value as NpcId;
}

export function asNpcRelationId(value: string): NpcRelationId {
  return value as NpcRelationId;
}

export function asNpcGroupId(value: string): NpcGroupId {
  return value as NpcGroupId;
}

export function asTokenId(value: string): TokenId {
  return value as TokenId;
}

export function asSceneTokenId(value: string): SceneTokenId {
  return value as SceneTokenId;
}

export function asPlayerId(value: string): PlayerId {
  return value as PlayerId;
}

export function asPlayerTeamId(value: string): PlayerTeamId {
  return value as PlayerTeamId;
}

export function asSceneNpcTokenId(value: string): SceneNpcTokenId {
  return value as SceneNpcTokenId;
}
