from zope import schema

from zope.formlib import form
from zope.schema.vocabulary import SimpleVocabulary, SimpleTerm

from Products.Five.browser.pagetemplatefile import ViewPageTemplateFile

from collective.facebook.portlets.config import PROJECTNAME
from collective.facebook.portlets import _

import logging

logger = logging.getLogger(PROJECTNAME)

color_scheme = SimpleVocabulary(
    [SimpleTerm(value=u"light", title=_(u"Light")), SimpleTerm(value=u"dark", title=_(u"Dark"))]
)


class IFacebookLikeBoxPortlet(IPortletDataProvider):
    """A portlet

    It inherits from IPortletDataProvider because for this portlet, the
    data that is being rendered and the portlet assignment itself are the
    same.
    """

    header = schema.TextLine(
        title=_(u"Header"), description=_(u"The header for the portlet. " "Leave empty for none."), required=False
    )
 def title(self):
     """This property is used to give the title of the portlet in the
     "manage portlets" screen.
     """
     return _(u"Facebook wall Portlet")
#from plone.registry.interfaces import IRegistry
#from collective.prettydate.interfaces import IPrettyDate

from collective.facebook.portlets.config import PROJECTNAME

from zope.security import checkPermission

from collective.facebook.portlets import _

import logging

logger = logging.getLogger(PROJECTNAME)

color_scheme = SimpleVocabulary(
    [SimpleTerm(value=u'light', title=_(u'Light')),
     SimpleTerm(value=u'dark', title=_(u'Dark'))]
    )

target = SimpleVocabulary(
    [SimpleTerm(value=u'_blank', title=_(u'_blank')),
     SimpleTerm(value=u'_top', title=_(u'_top')),
     SimpleTerm(value=u'_parent', title=_(u'_parent'))]
    )


class IFacebookActivityPortlet(IPortletDataProvider):
    """A portlet

    It inherits from IPortletDataProvider because for this portlet, the
    data that is being rendered and the portlet assignment itself are the