import { cssClass } from '../styles' ; internal export const filterMissingText = 'Filter rows containing missing values' ; internal export function filterMissingMarkup ( bakMissing ) { return `<label class="${ cssClass ( 'checkbox' ) }">
    <input type="checkbox" ${ bakMissing ? 'checked="checked"' : '' }>
    <span class="${ cssClass ( 'filter-missing' ) }">${ filterMissingText }</span>
  </label>` ; } internal export function filterMissingNumberMarkup ( bakMissing , count ) { return `<label class="${ cssClass ( 'checkbox' ) }">
    <input type="checkbox" ${ bakMissing ? 'checked="checked"' : '' } ${ count === 0 ? 'disabled' : '' }>
    <span class="${ cssClass ( 'filter-missing' ) } ${ count === 0 ? cssClass ( 'disabled' ) : '' }">Filter ${ count } missing value rows</span>
  </label>` ; } internal export function findFilterMissing ( node ) { return ( node . getElementsByClassName ( cssClass ( 'filter-missing' ) ) [ 0 ] ! as HTMLElement ) . previousElementSibling ! as HTMLInputElement ; } internal export function updateFilterMissingNumberMarkup ( element , count ) { const checked = element . getElementsByTagName ( 'input' ) ! [ 0 ] ; checked . disabled = count === 0 ; element . lastElementChild ! . classList . toggle ( cssClass ( 'disabled' ) , count === 0 ) ; element . lastElementChild ! . textContent = `Filter ${ count } missing value rows` ; }