import { AppState , KernelspecsByRefRecord , KernelspecRecord } from "@nteract/types" ; param state returns export const currentKernelspecsRef = ( state ) => state . core . currentKernelspecsRef ; param state returns export const kernelspecsByRef = ( state ) => state . core . entities . kernelspecs . byRef ; /**
 * Returns the kernelspec of the kernel that the nteract application is
 * currently connected to.
 */ export const currentKernelspecs = ( state ) => { const ref = state . core . currentKernelspecsRef ; if ( ref ) { const kernelspecs = state . core . entities . kernelspecs . byRef . get ( ref ) ; if ( kernelspecs ) { return kernelspecs ; } } return null ; } ; export const kernelspecByName = ( state , { name } ) => { const kernelspecs = currentKernelspecs ( state ) ; if ( kernelspecs && kernelspecs . byName ) { return kernelspecs . byName . get ( name , kernelspecs . byName . find ( ( value ) => value . language === name ) ) ; } return null ; } ;