blob: 3252cd602a1f7bb04ee542d0efbd5523a79a24f2 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
|
import { getProvider } from "./registry";
import { parseStickerId } from "./sticker-id";
import { registerDefaultStickerProviders } from "./providers";
import type { StickerResolveOptions } from "@/types/stickers";
export function resolveStickerId({
stickerId,
options,
}: {
stickerId: string;
options?: StickerResolveOptions;
}): string {
registerDefaultStickerProviders();
const parsedStickerId = parseStickerId({ stickerId });
return getProvider({
providerId: parsedStickerId.providerId,
}).resolveUrl({
stickerId,
options,
});
}
|