import path from 'path';
import { assetProvider } from '../util/assets.provider.js';
import { NotFound } from '../util/response.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();
    return assetProvider.serve(req, `sprites/${req.params.spriteName}`, mimeType);
}
//# sourceMappingURL=sprites.js.map