mirror of
https://github.com/woocommerce/woocommerce-paypal-payments.git
synced 2025-09-01 07:02:48 +08:00
14 lines
359 B
JavaScript
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;
|