<?xml version="1.0" encoding="UTF-8"?>
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi"
     xmlns:util="http://schemas.microsoft.com/wix/UtilExtension" >

  <?include $(sys.CURRENTDIR)\Common.wxi?>

  <?define MonacoPreviewHandlerMonacoAssetsFiles=?>
  <?define MonacoPreviewHandlerMonacoAssetsFilesPath=$(var.BinDir)Assets\Monaco\?>
  <?define MonacoPreviewHandlerCustomLanguagesFiles=?>
  <?define MonacoPreviewHandlerCustomLanguagesFilesPath=$(var.BinDir)Assets\Monaco\customLanguages\?>

  <Fragment>
    <DirectoryRef Id="BaseApplicationsAssetsFolder">
      <Directory Id="MonacoAssetsFolder" Name="Monaco">
        <Directory Id="MonacoPreviewHandlerMonacoCustomLanguagesFolder" Name="customLanguages" />
        <Directory Id="MonacoPreviewHandlerMonacoSRCFolder" Name="monacoSRC" />
      </Directory>
    </DirectoryRef>

    <DirectoryRef Id="MonacoAssetsFolder" FileSource="$(var.MonacoPreviewHandlerMonacoAssetsFilesPath)">
    <!-- Generated by generateFileComponents.ps1 -->
    <!--MonacoPreviewHandlerMonacoAssetsFiles_Component_Def-->
    </DirectoryRef>

    <DirectoryRef Id="MonacoPreviewHandlerMonacoCustomLanguagesFolder" FileSource="$(var.MonacoPreviewHandlerCustomLanguagesFilesPath)">
    <!-- Generated by generateFileComponents.ps1 -->
    <!--MonacoPreviewHandlerCustomLanguagesFiles_Component_Def-->
    </DirectoryRef>

    <ComponentGroup Id="FileExplorerPreviewComponentGroup">
      <Component Id="RemoveFileExplorerPreviewFolder" Guid="4AB83E58-17F1-41AF-B67F-F6C36EFED28D" Directory="MonacoAssetsFolder" >
        <RegistryKey Root="$(var.RegistryScope)" Key="Software\Classes\powertoys\components">
          <RegistryValue Type="string" Name="RemoveFileExplorerPreviewFolder" Value="" KeyPath="yes"/>
        </RegistryKey>
        <RemoveFolder Id="RemoveMonacoAssetsFolder" Directory="MonacoAssetsFolder" On="uninstall"/>
        <RemoveFolder Id="RemoveFolderMonacoPreviewHandlerCustomLanguagesFolder" Directory="MonacoPreviewHandlerMonacoCustomLanguagesFolder" On="uninstall"/>
        <RemoveFolder Id="RemoveFolderMonacoPreviewHandlerMonacoSRCFolder" Directory="MonacoPreviewHandlerMonacoSRCFolder" On="uninstall"/>
      </Component>
    </ComponentGroup>
  </Fragment>
</Wix>
