using MQTTnet.Client.Options;
using System;

namespace Birdmap.BLL.Options
{
    public class MqttClientOptions : MqttClientOptionsBuilder
    {
        public IServiceProvider ServiceProvider { get; }

        public MqttClientOptions(IServiceProvider serviceProvider)
        {
            ServiceProvider = serviceProvider;
        }

        public MqttClientOptions WithTopic(string topic)
        {
            WithUserProperty("Topic", topic);

            return this;
        }
    }
}
