import { type ResourceMetadata, type ResourceTemplateMetadata } from '../metadata';
import { type RawMetadataShape } from '../types';
import { tokenFactory } from './base.tokens';

export const FrontMcpResourceTokens = {
  type: tokenFactory.type('resource'),
  name: tokenFactory.meta('name'),
  title: tokenFactory.meta('title'),
  uri: tokenFactory.meta('uri'),
  description: tokenFactory.meta('description'),
  mimeType: tokenFactory.meta('mimeType'),
  icons: tokenFactory.meta('icons'),
  annotations: tokenFactory.meta('annotations'),
  _meta: tokenFactory.meta('_meta'),
  availableWhen: tokenFactory.meta('availableWhen'),
  metadata: tokenFactory.meta('metadata'), // used in resource({}) construction
} as const satisfies RawMetadataShape<ResourceMetadata, ExtendFrontMcpResourceMetadata>;

export const FrontMcpResourceTemplateTokens = {
  type: tokenFactory.type('resourceTemplate'),
  name: tokenFactory.meta('name'),
  title: tokenFactory.meta('title'),
  uriTemplate: tokenFactory.meta('uriTemplate'),
  description: tokenFactory.meta('description'),
  mimeType: tokenFactory.meta('mimeType'),
  icons: tokenFactory.meta('icons'),
  annotations: tokenFactory.meta('annotations'),
  _meta: tokenFactory.meta('_meta'),
  availableWhen: tokenFactory.meta('availableWhen'),
  metadata: tokenFactory.meta('metadata'), // used in resourceTemplate({}) construction
} as const satisfies RawMetadataShape<ResourceTemplateMetadata, ExtendFrontMcpResourceTemplateMetadata>;

// Extended metadata symbols for class decorators
export const extendedResourceMetadata = tokenFactory.meta('extendedResourceMetadata');
export const extendedResourceTemplateMetadata = tokenFactory.meta('extendedResourceTemplateMetadata');
