import*as Root from"../root/root.js";import{PreRegisteredView}from"./ViewManager.js";const registeredViewExtensions=[],viewIdSet=new Set;export function registerViewExtension(e){const t=e.id;if(viewIdSet.has(t))throw new Error(`Duplicate view id '${t}': ${(new Error).stack}`);viewIdSet.add(t),registeredViewExtensions.push(new PreRegisteredView(e))}export function getRegisteredViewExtensions(){return registeredViewExtensions.filter((e=>Root.Runtime.Runtime.isDescriptorEnabled({experiment:e.experiment(),condition:e.condition()})))}const registeredLocationResolvers=[],viewLocationNameSet=new Set;export function registerLocationResolver(e){const t=e.name;if(viewLocationNameSet.has(t))throw new Error(`Duplicate view location name registration '${t}'`);viewLocationNameSet.add(t),registeredLocationResolvers.push(e)}export function getRegisteredLocationResolvers(){return registeredLocationResolvers}export const ViewLocationCategoryValues={ELEMENTS:"Elements",DRAWER:"Drawer",DRAWER_SIDEBAR:"Drawer sidebar",PANEL:"Panel",NETWORK:"Network",SETTINGS:"Settings",SOURCES:"Sources"};