
package Text::Wigwam::Engine::Fusion::Paint::Sublist;

    use strict;
    use warnings;
    our $VERSION = '0.01';

sub new {
    my ($class, $data) = @_;
    return bless {
        DATA => $data || [],
        TYPE => 'sublist'
    }, ref($class) || $class;
}
sub data { $_[0]->{DATA} }
sub type { $_[0]->{TYPE} }
sub size { scalar @{$_[0]->data} }
sub add {
    my ($self, $list) = @_;
    push( @{$self->data}, $list );
    warn "Added an invalid type to a sublist ".  ref($list). " ". join( ', ', caller )
      unless ref($list) =~ /(?:Sublist|Group)/;
}

1;
