woocommerce-paypal-payments/modules/ppcp-wc-gateway/resources/js/common/display-manager/ActionFactory.js

14 lines
359 B
JavaScript

import ElementAction from "./action/ElementAction";
class ActionFactory {
static make(actionConfig) {
switch (actionConfig.type) {
case 'element':
return new ElementAction(actionConfig);
}
throw new Error('[ActionFactory] Unknown action: ' + actionConfig.type);
}
}
export default ActionFactory;