import * as cheerio from "cheerio" ; import { BoxrecCommonLinks } from "../../boxrec-common-tables/boxrec-common-links" ; import { BoxrecGeneralLinks } from "../../boxrec-common-tables/boxrec-common.constants" ; import { BoxrecCommonTableHeader , getColumnDataByColumnHeader } from "../../helpers" ; export abstract class BoxrecProfileCommonRow { protected readonly $ : CheerioStatic ; constructor ( protected headerColumns , boxrecBodyBout , additionalData = null ) { const html = `<table><tr>${ boxrecBodyBout }</tr><tr>${ additionalData }</tr></table>` ; this . $ = cheerio . load ( html ) ; } get links ( ) : BoxrecGeneralLinks { return BoxrecCommonLinks . parseLinkInformation < BoxrecGeneralLinks > ( this . $ ( getColumnDataByColumnHeader ( this . $ , this . headerColumns , BoxrecCommonTableHeader . links ) ) , { bio : null , bout : null , event : null , other : [ ] , } ) ; } }