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 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;
}
