import * as React from "react"
import withTranslate from "jamplay-common/i18n/withTranslate"
import AuthorItemSubscribe from "./AuthorItemSubscribe"

interface AuthorItemPropTypes extends AuthorItemData, withTranslatePropType {
  highlightText: string
  refetchData: any
  loading?: boolean
}
export const AuthorItemWithSubLabel = (props: AuthorItemPropTypes) => {
  return (
    <div>
      <AuthorItemSubscribe
        loading={props.loading}
        authorId={props._id}
        author={props}
        highlightText={props.highlightText}
        opts={{
          size: "big"
        }}
        refetch={props.refetchData}
      />
    </div>
  )
}

export default withTranslate(AuthorItemWithSubLabel) as React.SFC<AuthorItemPropTypes>
