using Infrastructure.CloudSdk.mqttmessagecenter;
using OpenAuth.App.ServiceApp;
using OpenAuth.WebApi.Model.mqtt.ModelResponse;

namespace OpenAuth.WebApi.Model.mqtt
{
    public class ThingDrcHandler : IMqttMessageHandler
    {
        private readonly ILogger<ThingDrcHandler> _logger; 
        public ThingDrcHandler(ILogger<ThingDrcHandler> logger)
        {
            _logger = logger; 
        }

        public bool CanHandle(string topic)
        {
            return topic.Contains("/drc");
        }

        public Task HandleAsync(string topic, string payload)
        {
            //_logger.LogError($"[osd] Topic={topic}, Payload={payload}");
            //Console.WriteLine($"[osd] Topic={topic}, Payload={payload}");
            return Task.CompletedTask;
        }
    }
}
