<configure
    xmlns="http://namespaces.zope.org/zope"
    xmlns:genericsetup="http://namespaces.zope.org/genericsetup"
    xmlns:plone="http://namespaces.plone.org/plone"
    i18n_domain="untranslated"
    >

  <include
      package="."
      file="permissions.zcml"
      />


  <!-- Include configuration for dependencies listed in setup.py -->
  <include package="ploneintranet.docconv.client" />

  <include package=".viewlets" />
  <include package=".browser" />
  <include package=".vocabularies" />
  <include package=".widgets" />

  <interface interface=".pinning.IPinned" />

  <adapter
      factory=".indexers.pinned"
      name="pinned"
      />
  <plone:behavior
      name="quaive.pinning"
      title="Pinning behavior."
      description="Allows to pin content to be displayed on top of listings."
      factory=".pinning.PinningBehavior"
      provides=".pinning.IPinningBehavior"
      />

  <!-- switch off all IAppLayer on the navigation root -->
  <subscriber
      for="plone.app.layout.navigation.interfaces.INavigationRoot
           zope.traversing.interfaces.IBeforeTraverseEvent"
      handler=".layers.disable_app_layers"
      />
  <!-- enable only the "right" IAppLayer per app
         see app.AbstractAppContainer -->

  <adapter
      factory=".adapters.AppContent"
      for="plone.dexterity.interfaces.IDexterityContent"
      />
  <adapter
      factory=".adapters.LinkReadFile"
      provides="zope.filerepresentation.interfaces.IRawReadFile"
      />

  <adapter
      factory=".transforms.TileThemingTransform"
      provides="plone.transformchain.interfaces.ITransform"
      for="plone.tiles.tile.Tile
           ploneintranet.layout.interfaces.IPloneintranetLayoutLayer"
      name="plone.tiles.tiletheming"
      />

  <genericsetup:registerProfile
      name="default"
      title="Plone Intranet: -- [Layout]"
      description="Extension profile for ploneintranet.layout."
      provides="Products.GenericSetup.interfaces.EXTENSION"
      directory="profiles/default"
      post_handler="ploneintranet.layout.setuphandlers.setupVarious"
      />

  <genericsetup:registerProfile
      name="testing"
      title="Plone Intranet: -- [Layout testing]"
      description="Extension profile for ploneintranet.layout."
      provides="Products.GenericSetup.interfaces.EXTENSION"
      directory="profiles/testing"
      />

  <genericsetup:registerProfile
      name="uninstall"
      title="Plone Intranet: -- [Layout uninstall]"
      description="Extension profile for ploneintranet.layout."
      provides="Products.GenericSetup.interfaces.EXTENSION"
      directory="profiles/uninstall"
      post_handler="ploneintranet.layout.setuphandlers.uninstall"
      />

</configure>
