import { addClass , Component , hide , removeClass , show , } from 'src/ts/utils' ; const classLeft = 'tooltip-left' ; const classRight = 'tooltip-right' ; const classBottom = 'tooltip-bottom' ; export class Tooltip extends Component { constructor ( container , html ? ) { super ( container , '.tooltip_content' ) ; addClass ( container , 'tooltip' ) ; if ( html ) this . html = html ; } get html ( ) : string { return this . el . innerHTML ; } set html ( v ) { this . el . innerHTML = v ; } resetPos ( ) { removeClass ( this . el , classLeft ) ; removeClass ( this . el , classRight ) ; removeClass ( this . el , classBottom ) ; } setBottom ( ) { addClass ( this . el , classBottom ) ; } setLeft ( ) { addClass ( this . el , classLeft ) ; } setRight ( ) { addClass ( this . el , classRight ) ; } hide ( ) { hide ( this . el ) ; } show ( ) { show ( this . el ) ; } }