import Action from './Action';
import Rule from './Rule';


export default class SimpleRule extends Rule {
    constructor(prefix, suffix, event, css, xpath, code, key, contextURL, contextCSS, contextXPath, description) {
        super(prefix, suffix, event, css, xpath, code, key, contextURL, contextCSS, contextXPath, description);
    }

    makeAction(event): Action {
        return new Action(this.prefix);
    }

    actionToElements(action: Action): Element[] {
        if (action.prefix !== this.prefix) {
            return [];
        }
        const elements = this.findMatchedElements();
        return elements;
    }
}
