import { fsa } from '@chunkd/fs';
import path from 'path';
import { NotFound } from '../util/response.js';
import { assetProvider } from '../util/assets.provider.js';
const Extensions = new Map();
Extensions.set('.png', 'image/png');
Extensions.set('.json', 'application/json');
export async function spriteGet(req) {
    const extension = path.extname(req.params.spriteName);
    const mimeType = Extensions.get(extension);
    if (mimeType == null)
        return NotFound();
    const targetFile = fsa.join('sprites', req.params.spriteName);
    return assetProvider.serve(req, targetFile, mimeType);
}
//# sourceMappingURL=sprites.js.map