import Copy from './Copy'
import Link from 'next/link'
import AbbreviateEnd from './TextEndAbbreviation'
import Bold from './Bold'
export default (props: {
value?: any,
body?: any,
text?: any,
copy?: string,
abbreviatemid?: number,
abbreviatend?: number,
bold?: boolean,
href?: string,
target?: string,
nexthref?: string,
islink?: boolean,
vfontSize?: number,
fontSize?: number | string,
fontWeight?: number | string,
on?: () => void,
wlink?: string,
wbold?: boolean,
whighlight?: boolean,
whref?: string,
wtarget?: string,
wnexthref?: string,
onwlink?: () => void,
title?: string,
nospace?: boolean,
image?: any,
icon?: string,
titlemb?: number,
s?: number | string,
extlink?: boolean,
vmarginTop?: number | string,
onimage?: () => void,
imb?: number | string,
bgcolor?:string,
highlight?:boolean,
vdir?:string,
tmb?:number | string,
valuecolor?:string,
help?:boolean,
onhelp?:()=>void,
}) => {
var value = null;
let textstring = true
if (typeof props.value != "undefined") {
value = props.value
}
if (typeof props.body != "undefined") {
value = props.body
}
if (typeof props.text != "undefined") {
value = props.text
}
if (typeof value != "string") {
textstring = false
}
var copy = props.copy
if (props.abbreviatemid) {
if (value.length > props.abbreviatemid) {
var up = value.substr(0, (props.abbreviatemid / 2 - 3))
var down = value.substr(value.length - (props.abbreviatemid / 2 - 3))
value = up + "..." + down
}
}
if (props.abbreviatend) {
value = AbbreviateEnd(value, props.abbreviatend)
}
var text = value;
if (props.bold) {
text =