import { mkdirSync } from 'node:fs';
import { join } from 'pathe';

const MEDIA_ROOT = join(process.cwd(), 'storage', 'telegram-media');

mkdirSync(MEDIA_ROOT, { recursive: true });

export function getMediaRoot() {
  return MEDIA_ROOT;
}

export function resolveMediaAbsolutePath(relativePath: string) {
  return join(MEDIA_ROOT, relativePath);
}

