/**
 * CommentBlocker component
 *
 * Generated by coz on 2016-12-30,
 * from a template provided by apeman-asset-templates.
 *
 * @function CommentBlocker
 */
'use strict'

import React from 'react'
import defineDebug from 'debug'
import { ApButton } from 'apeman-react-basic'
import { asLocaled, asPure, combine } from '../../wrappers'

const debug = defineDebug('project:fragment:comment-blocker')

/** @lends CommentBlocker */
const CommentBlocker = ({ l, askToAuth }) => (
  <div className="comment-blocker">
    <div className="comment-blocker-text">
      { l('messages.NEEDS_SIGN_TO_COMMENT') }
    </div>
    <div className="comment-blocker-action">
      <ApButton onTap={ askToAuth }>
        { l('buttons.SHOW_SIGNIN') }
      </ApButton>
    </div>
  </div>
)

export default combine(
  asPure(),
  asLocaled.proxy()
)(CommentBlocker)
