import { filenameToType } from './utils' ; import type { LoadProtocolAction , CloseProtocolAction , ProtocolData , } from './types' ; export function loadProtocol ( file , data ) { return { type : 'protocol:LOAD' , payload : { file : { name : file . name , type : filenameToType ( file . name ) , lastModified : file . lastModified , } , data , } , } ; } export function closeProtocol ( ) { return { type : 'protocol:CLOSE' , } ; }