public static void SetTemplateHtml(TemplateInfo templateInfo, string html)
        {
            var directoryPath = GetTemplatesDirectoryPath();
            var htmlPath      = PollUtils.PathCombine(directoryPath, templateInfo.Name, templateInfo.Main);

            PollUtils.WriteText(htmlPath, html);
        }
        public static void Edit(TemplateInfo templateInfo)
        {
            var directoryPath = Context.PluginApi.GetPluginPath(PollUtils.PluginId, "templates");

            var configJson = Context.UtilsApi.JsonSerialize(templateInfo);
            var configPath = PollUtils.PathCombine(directoryPath, templateInfo.Name, "config.json");

            PollUtils.WriteText(configPath, configJson);
        }
        public static void Clone(string nameToClone, TemplateInfo templateInfo, string templateHtml = null)
        {
            var directoryPath = Context.PluginApi.GetPluginPath(PollUtils.PluginId, "templates");

            PollUtils.CopyDirectory(PollUtils.PathCombine(directoryPath, nameToClone), PollUtils.PathCombine(directoryPath, templateInfo.Name), true);

            var configJson = Context.UtilsApi.JsonSerialize(templateInfo);
            var configPath = PollUtils.PathCombine(directoryPath, templateInfo.Name, "config.json");

            PollUtils.WriteText(configPath, configJson);

            if (templateHtml != null)
            {
                SetTemplateHtml(templateInfo, templateHtml);
            }
        }