package App::SCS::Plugin::Core::PagePlugin::RemovePlugin;

use Moo;

with 'App::SCS::Role::PagePlugin';

has name => (is => 'ro', required => 1);

has plugin_map => (is => 'ro', required => 1);

has class => (is => 'lazy', builder => sub {
  my ($self) = @_;
  $self->plugin_map->{$self->name}{class}
});

sub filter_plugins {
  my ($self, $plugins) = @_;
  [ grep !$_->isa($self->class), @$plugins ];
}

1;
