import { ActionHandleStrategy } from '../action-handle-strategy.abstract';
/**
 * Replace list item nest list strategy.
 */
export class ListItemReplaceNestListStrategy extends ActionHandleStrategy {
  /**
   * @inheritDoc
   */
  handleAction(action, target) {
    action.newList.forEach((listBlock) => {
      listBlock.parent = target;
    });
    target.nestList = action.newList;
  }
}
