export function normalizeMediaSelectionId(id) {
    const normalized = id
        ?.trim()
        .replace(/[{}()]/g, "")
        .toLowerCase();
    return normalized || undefined;
}
export function parseMediaSelectionIdPath(selectedIdPath) {
    const ids = (selectedIdPath ?? "")
        .split("/")
        .map(normalizeMediaSelectionId)
        .filter((id) => !!id);
    if (ids.length === 0) {
        return {};
    }
    return {
        folderId: ids.length > 1 ? ids[ids.length - 2] : undefined,
        mediaId: ids[ids.length - 1],
    };
}
//# sourceMappingURL=mediaSelectionPath.js.map