<configure
    xmlns="http://namespaces.zope.org/zope"
    xmlns:five="http://namespaces.zope.org/five"
    xmlns:genericsetup="http://namespaces.zope.org/genericsetup"
    xmlns:zcml="http://namespaces.zope.org/zcml"
    xmlns:browser="http://namespaces.zope.org/browser"
    xmlns:i18n="http://namespaces.zope.org/i18n"
    xmlns:pp="http://namespaces.zopyx.com/pp"
    xmlns:plone="http://namespaces.plone.org/plone"
    i18n_domain="zopyx.plone.smashdocs"
    >

    <include package="plone.browserlayer" />
    <include package="Products.CMFCore" file="permissions.zcml" />
    <include package=".browser" />

    <adapter name="SearchableText" factory=".indexers.document_searchabletext"/>


    <subscriber
        for=".smashdocument.ISmashDocument
             zope.lifecycleevent.IObjectCreatedEvent"
        handler=".subscriber.update_metadata"
    />

    <subscriber
        for=".smashdocument.ISmashDocument
             zope.lifecycleevent.IObjectModifiedEvent"
        handler=".subscriber.update_metadata"
    />

    <i18n:registerTranslations directory="locales" />

    <pp:resourceDirectory
        name="smashdocs"
        directory="resources_default"
    />

    <genericsetup:registerProfile
        name="default"
        title="SMASHDOCs integration with Plone"
        directory="profiles/default"
        description="SMASHDOCs"
        provides="Products.GenericSetup.interfaces.EXTENSION"
    />

    <genericsetup:registerProfile
        name="smashdocs"
        title="SMASHDOCs integration with Plone (SD only)"
        directory="profiles/smashdocs"
        description="SMASHDOCs integration with Plone (SD only)"
        provides="Products.GenericSetup.interfaces.EXTENSION"
    />

    <genericsetup:registerProfile
        name="uninstall"
        description="SMASHDOCs integration with Plone (uninstall)"
        directory="profiles/uninstall"
        provides="Products.GenericSetup.interfaces.EXTENSION"
      />
</configure>
