package App::Clifton::BridgeConfigSet;

use aliased 'App::Clifton::BridgeConfig';
use aliased 'App::Clifton::BridgeConfig::Jabber' => 'BridgeConfig_Jabber';
use aliased 'App::Clifton::BridgeConfig::IRC' => 'BridgeConfig_IRC';
use Moo;

with 'App::Clifton::Set';

sub _set_of_class { BridgeConfig }
sub _set_over { 'name' }

sub _spec_to_constructor_args {
  my ($self, $spec) = @_;
  +{
    name => $spec->{name},
    jabber => BridgeConfig_Jabber->new($spec->{jabber}),
    irc => BridgeConfig_IRC->new($spec->{irc}),
  }
}

1;
