var h=(e,r,n)=>{let m=new RegExp("^[A-Za-z]:[^/\\\\]");if(e=e.trim(),e!==""){let i=e.replace(/[\/\\]+$/,""),c=r.some(o=>`${i}/`.indexOf(o)===0||o.indexOf(`${i}/`)===0);if(m.test(i)){n.error("Invalid folder path.","Error");return}if(c)n.error("Folder already exists or conflicts with an existing folder structure.","Error");else{if(i.includes(":")){if(r.length===1&&r[0]==="/"){n.info('In order to add, please remove "/" from Default folders.',"Info");return}e=i+"\\",e=e.replace(/\//g,"\\")}else{if(r.length===1&&r[0]==="/"){n.info('In order to add, please remove "/" from Default folders.',"Info");return}e=i+"/",e=e.replace(/\\/g,"/")}r.push(e),e="",n.success("Selected Folder has been added successfully","Success")}}else n.error("Please enter a valid folder path.","Error")};export{h as a};
