<?php

namespace Mautic\CoreBundle\Twig\Helper;

final class MautibotHelper
{
    public const OPEN_MOUTH     = 'openMouth';

    public const OPEN_MOUTH_SVG = 'data:image/png;base64,[encoded data, 52776 characters]';

    public const SMILE          = 'smile';

    public const SMILE_SVG      = 'data:image/png;base64,[encoded data, 50488 characters]';

    public const WAVE           = 'wave';

    public const WAVE_SVG       = 'data:image/png;base64,[encoded data, 51492 characters]';

    /**
     * @param string $image openMouth | smile | wave
     */
    public function getImage($image): string
    {
        return self::get($image);
    }

    /**
     * Static alternative to retrieve image.
     *
     * @param string $image openMouth | smile | wave
     */
    public static function get($image): string
    {
        return match ($image) {
            self::OPEN_MOUTH => self::OPEN_MOUTH_SVG,
            self::SMILE      => self::SMILE_SVG,
            self::WAVE       => self::WAVE_SVG,
            default          => '',
        };
    }

    public function getName(): string
    {
        return 'mautibot';
    }
}
