import { catalogue } from '../helpers/catalogue.mjs';
import { createMotionComponent } from './createMotionComponent.mjs';

"use strict";
const motionCatalogue = new Proxy({}, {
  get(target, prop) {
    if (!(prop in target)) {
      if (prop in catalogue) {
        throw new Error(`${prop} is part of the PIXI namespace, but is not part of the motion namespace! Did you forget to extendMotion?`);
      } else {
        throw new Error(`${prop} is not part of the motion namespace! Did you forget to extendMotion?`);
      }
    }
    return target[prop];
  },
  set(target, prop, value) {
    if (typeof prop === "string") {
      const component = createMotionComponent(`pixi${prop}`);
      target[prop.toLowerCase()] = component;
      target[`pixi${prop}`] = component;
    } else {
      target[prop] = value;
    }
    return true;
  }
});

export { motionCatalogue };
//# sourceMappingURL=motionCatalogue.mjs.map
