// WordPress @wordpress/plugins shim
// Exports from wp.plugins global

const plugins = window.wp?.plugins || {};

export const registerPlugin = plugins.registerPlugin || (() => {
  console.warn("wp.plugins.registerPlugin not available");
});

export const unregisterPlugin = plugins.unregisterPlugin || (() => {});
export const getPlugin = plugins.getPlugin || (() => null);
export const getPlugins = plugins.getPlugins || (() => []);

export default plugins;
