<html><head><meta name="color-scheme" content="light dark"></head><body><pre style="word-wrap: break-word; white-space: pre-wrap;">=head1 NAME

FixMyStreet::Roles::Cobrand::Waste - cobrand functions shared with all waste clients

=cut

package FixMyStreet::Roles::Cobrand::Waste;

use Moo::Role;
use Path::Tiny;

=head2 svg_container_sack

TYPE is either 'normal' or 'stripe'.

=cut

sub svg_container_sack {
    my ($type, $colour) = @_;
    my $dir = path(FixMyStreet-&gt;path_to("web/i/waste-containers"));
    $type = ($type eq 'stripe') ? 'sack-stripe' : 'sack';
    return {
        type =&gt; 'svg',
        data =&gt; $dir-&gt;child("$type.svg")-&gt;slurp_raw,
        colour =&gt; $colour,
    };
}

=head2 svg_container_bin

TYPE is either 'wheelie' or 'communal'.

=cut

sub svg_container_bin {
    my ($type, $colour_main, $colour_lid, $recycling_logo) = @_;
    my $dir = path(FixMyStreet-&gt;path_to("web/i/waste-containers"));
    return {
        type =&gt; 'svg',
        data =&gt; $dir-&gt;child("$type.svg")-&gt;slurp_raw,
        colour =&gt; $colour_main,
        lid_colour =&gt; $colour_lid,
        recycling_logo =&gt; $recycling_logo,
    };
}

sub svg_container_box {
    my ($colour, $recycling_logo) = @_;
    my $dir = path(FixMyStreet-&gt;path_to("web/i/waste-containers"));
    return {
        type =&gt; 'svg',
        data =&gt; $dir-&gt;child("box.svg")-&gt;slurp_raw,
        colour =&gt; $colour,
        recycling_logo =&gt; $recycling_logo,
    };
}

1;
</pre></body></html>