fix my script

using System.Collections.Generic;
using System.IO;
using TMPro;
using UnityEngine;
using Michsky.UI.Reach;
using UnityEngine.UI;

public class LOADSAVE : MonoBehaviour
{
    public string FinalPath;
    public TMP_InputField AgentName;
    public TMP_InputField AgentPerson;
    public Michsky.UI.Reach.Dropdown SelectedAgent;
    public string RefVoice;
    public TMP_InputField Transcription;

    public string baseFolder = string.Empty;
    public string agentFolderName = string.Empty;
    public string agentFolderPath = string.Empty;

    public void Start()
    {
        baseFolder = Path.Combine(Application.persistentDataPath, "Agent Presets");
    }

    public void LoadFileVoice()
    {
        // Use NativeFilePicker.ConvertExtensionToFileType with .wav extension
        string wavFileType = NativeFilePicker.ConvertExtensionToFileType(".wav");

        NativeFilePicker.PickFile((path) =>
        {
            if (string.IsNullOrEmpty(path))
            {
                Debug.Log("Operation cancelled");
                // Show some kind of window here if needed
                return;
            }

            Debug.Log($"Selected file: {path}");

            FinalPath = path;
            RefVoice = path;

            try
            {
                // Determine destination folder: "Agent Presets/[AgentName]"
                baseFolder = Path.Combine(Application.persistentDataPath, "Agent Presets");
                agentFolderName = SanitizeFileName(AgentName.text);
                agentFolderPath = Path.Combine(baseFolder, agentFolderName);

                if (!Directory.Exists(agentFolderPath))
                {
                    Directory.CreateDirectory(agentFolderPath);
                }

                string destFilePath = Path.Combine(agentFolderPath, "Agent_Voice.wav");

                // Copy selected wav file, overwrite if exists
                File.Copy(path, destFilePath, true);

                Debug.Log($"Voice file copied to: {destFilePath}");

                // TODO: Show confirmation UI window here

            }
            catch (System.Exception ex)
            {
                Debug.LogError($"Failed to copy voice file: {ex.Message}");
                // Show error UI window here if needed
            }
        }, new string[] { wavFileType });
    }

    public void SaveFile(string Data)
    {
        string filePath = Path.Combine(Application.temporaryCachePath, "test.wav");

        byte[] bytes = File.ReadAllBytes(Data);
        File.WriteAllBytes(filePath, bytes);

        // Call ExportFile without assignment because it returns void
        NativeFilePicker.ExportFile(filePath, (success) =>
        {
            // Show some kind of window here.
        });
    }

    public void SaveAgentTranscription()
    {
        try
        {
            // Base folder "Agent Presets"
            string baseFolder = Path.Combine(Application.persistentDataPath, "Agent Presets");

            if (!Directory.Exists(baseFolder))
                Directory.CreateDirectory(baseFolder);

            // Sanitize agent folder name
            string agentFolderName = SanitizeFileName(AgentName.text);
            string agentFolderPath = Path.Combine(baseFolder, agentFolderName);

            if (!Directory.Exists(agentFolderPath))
                Directory.CreateDirectory(agentFolderPath);

            string filePath = Path.Combine(agentFolderPath, "Agent_Transcription.txt");

            // Write transcription text to file
            File.WriteAllText(filePath, Transcription.text);

            Debug.Log($"Transcription saved successfully at: {filePath}");

            // TODO: Show UI popup or notify the user here

        }
        catch (System.Exception ex)
        {
            Debug.LogError($"Failed to save transcription: {ex}");
            // TODO: Show error UI popup
        }
    }

    public void SaveFileAgent()
    {
        try
        {
            string baseFolder = Path.Combine(Application.persistentDataPath, "Agent Presets");

            if (!Directory.Exists(baseFolder))
                Directory.CreateDirectory(baseFolder);

            string agentFolderName = SanitizeFileName(AgentName.text);
            string agentFolderPath = Path.Combine(baseFolder, agentFolderName);

            if (!Directory.Exists(agentFolderPath))
                Directory.CreateDirectory(agentFolderPath);

            string fileName = SanitizeFileName(AgentName.text + "_INFO") + ".txt";
            string filePath = Path.Combine(agentFolderPath, fileName);

            List<string> lines = new List<string>
            {
                AgentName.text,
                AgentPerson.text,
            };

            File.WriteAllLines(filePath, lines);

            Debug.Log($"File saved successfully at: {filePath}");
        }
        catch (System.Exception ex)
        {
            Debug.LogError($"Failed to save file: {ex}");
        }
    }

    public void LoadAgentsInDrop()
    {
        string baseFolder = Path.Combine(Application.persistentDataPath, "Agent Presets");

        if (!Directory.Exists(baseFolder))
        {
            Debug.LogWarning($"Agent Presets folder does not exist at: {baseFolder}");
            return;
        }

        // Clear existing dropdown items first
        SelectedAgent.items.Clear();

        string[] agentFolders = Directory.GetDirectories(baseFolder);
        if (agentFolders.Length == 0)
        {
            Debug.Log("No agent folders found in Agent Presets.");
        }

        foreach (string folderPath in agentFolders)
        {
            string folderName = Path.GetFileName(folderPath);
            SelectedAgent.CreateNewItem(folderName);
        }
    }

    public void RecordAgentVoice()
    {
        // make some kind of toggle in here that lets me hold down the button to record and when I lift up the button it saves the recording in the proper Agent Presets voice folder saving the recording as Agent_Voice.wav
    }

    private string SanitizeFileName(string filename)
    {
        foreach (char c in Path.GetInvalidFileNameChars())
            filename = filename.Replace(c.ToString(), "");
        return filename;
    }
}

based off what you learn from this script

private string pdfFileType;

void Start()
{
	pdfFileType = NativeFilePicker.ConvertExtensionToFileType( "pdf" ); // Returns "application/pdf" on Android and "com.adobe.pdf" on iOS
	Debug.Log( "pdf's MIME/UTI is: " + pdfFileType );
}

void Update()
{
	if( Input.GetMouseButtonDown( 0 ) )
	{
		// Don't attempt to import/export files if the file picker is already open
		if( NativeFilePicker.IsFilePickerBusy() )
			return;

		if( Input.mousePosition.x < Screen.width / 3 )
		{
			// Pick a PDF file
			NativeFilePicker.PickFile( ( path ) =>
			{
				if( path == null )
					Debug.Log( "Operation cancelled" );
				else
					Debug.Log( "Picked file: " + path );
			}, new string[] { pdfFileType } );
		}
		else if( Input.mousePosition.x < Screen.width * 2 / 3 )
		{
#if UNITY_ANDROID
			// Use MIMEs on Android
			string[] fileTypes = new string[] { "image/*", "video/*" };
#else
			// Use UTIs on iOS
			string[] fileTypes = new string[] { "public.image", "public.movie" };
#endif

			// Pick image(s) and/or video(s)
			NativeFilePicker.PickMultipleFiles( ( paths ) =>
			{
				if( paths == null )
					Debug.Log( "Operation cancelled" );
				else
				{
					for( int i = 0; i < paths.Length; i++ )
						Debug.Log( "Picked file: " + paths[i] );
				}
			}, fileTypes );
		}
		else
		{
			// Create a dummy text file
			string filePath = Path.Combine( Application.temporaryCachePath, "test.txt" );
			File.WriteAllText( filePath, "Hello world!" );

			// Export the file
			NativeFilePicker.ExportFile( filePath, ( success ) => Debug.Log( "File exported: " + success ) );
		}
	}
}

and change anything else that's needed to change but don't break the script many things tie into this scripts voids