<?php
/**
 * @copyright	Copyright (C) 2013 - 2014 Cms2Cms. All rights reserved.
 * @license	GNU/GPLv3 http://www.gnu.org/licenses/gpl-3.0.html
 */

// No direct access
defined( '_JEXEC' ) or die( 'Restricted access' );

class CmsPluginView
{

    public function _e($message, $domain)
    {
        //todo
        echo $message;
    }

    public function __($message, $domain)
    {
        //todo
        return $message;
    }

    public function getFormTempKey($name)
    {
        //todo
        return true;
    }

    public function verifyFormTempKey($value, $name)
    {
        // todo
        return '';
    }

    public function getAppUrl()
    {
        return 'http://app.cms2cms.com'; /* no trailing slash */
    }

    public function getVideoLink()
    {
        return 'http://www.youtube.com/watch?feature=player_detailpage&v=DQK01NbrCdw#t=25s';
    }

    public function getPluginSourceName()
    {
        return $this->__('WordPress', 'cms2cms-mirgation');
    }

    public function getPluginSourceType()
    {
        return 'WordPress';
    }

    public function getPluginTargetName()
    {
        return $this->__('Joomla', 'cms2cms-mirgation');
    }

    public function getPluginTargetType()
    {
        return 'Joomla';
    }

    public function getPluginNameLong()
    {
        return sprintf(
            $this->__('CMS2CMS: Automated %s to %s 3 Migration ', 'cms2cms-mirgation'),
            $this->getPluginSourceName(),
            $this->getPluginTargetName()
        );
    }

    public function getPluginNameShort()
    {
        return sprintf(
            $this->__('wordpresstoj3', 'cms2cms-mirgation'),
            $this->getPluginSourceName(),
            $this->getPluginTargetName()
        );
    }

    public function getPluginReferrerId()
    {
        return sprintf(
            'Plugin | %s | %s to %s',
            $this->getPluginTargetType(),
            $this->getPluginSourceType(),
            $this->getPluginTargetType()
        );
    }

    public function getRegisterUrl()
    {
        return $this->getAppUrl() . '/auth/register';
    }

    public function getLoginUrl()
    {
        return $this->getAppUrl() . '/auth/login';
    }

    public function getForgotPasswordUrl()
    {
        return $this->getAppUrl() . '/auth/forgot-password';
    }

    public function getVerifyUrl()
    {
        return $this->getAppUrl() . '/wizard/verify';
    }

    public function getWizardUrl()
    {
        return $this->getAppUrl() . '/wizard';
    }

    public function getDownLoadBridgeUrl($cms2cms_authentication)
    {
        return $this->getAppUrl() . '/wizard/get-bridge?callback=plugin&authentication=' . urlencode(json_encode($cms2cms_authentication));
    }

}
