<script>
    import {
        socket,
        stream_state,
        opened_file_store,
        datasetname_store
    } from '../../store.js';

    const stop_action = () => {
        const msg = {
          type: "stream",
          value: "stop"
        };
        socket.send(JSON.stringify(msg));
        $stream_state = false;
        $opened_file_store = "File closed.";
        $datasetname_store = "";
    }
</script>

<link href="https://fonts.googleapis.com/icon?family=Material+Icons" rel="stylesheet">
<button type="button"
    class="text-white bg-blue-700 hover:bg-blue-800 focus:ring-4 focus:outline-none focus:ring-blue-300 font-medium rounded-lg text-sm text-center inline-flex items-center dark:bg-blue-600 dark:hover:bg-blue-700 dark:focus:ring-blue-800"
    on:click={stop_action}>
    <i class="material-icons">stop_circle</i>
</button>


<style>

</style>