<configure
    xmlns="http://namespaces.zope.org/zope"
    xmlns:autofeature="http://namespaces.zope.org/autofeature"
    xmlns:i18n="http://namespaces.zope.org/i18n"
    xmlns:five="http://namespaces.zope.org/five"
    xmlns:zcml="http://namespaces.zope.org/zcml"
    xmlns:profilehook="http://namespaces.zope.org/profilehook"
    i18n_domain="ftw.events">

    <include package="ftw.autofeature" file="meta.zcml" />
    <autofeature:extras />

    <i18n:registerTranslations directory="locales" />

    <five:registerPackage package="." initialize=".initialize" />

    <include file="lawgiver.zcml" zcml:condition="installed ftw.lawgiver" />
    <include file="permissions.zcml" />
    <include file="profiles.zcml" />
    <include file="resources.zcml" zcml:condition="installed ftw.theming" />
    <include package=".viewlets" />
    <include package=".browser" />
    <include package=".behaviors" />
    <include package=".portlets" />

    <utility
        component=".vocabularies.SubjectVocabulary"
        name="ftw.events.vocabulary.subjects"
        />

    <subscriber
        for="ftw.events.interfaces.IEventFolder
             zope.lifecycleevent.interfaces.IObjectAddedEvent"
        handler="ftw.events.contents.eventfolder.create_event_listing_block"
        />

    <subscriber
        for="ftw.events.interfaces.IEventListingBlock
             zope.lifecycleevent.interfaces.IObjectAddedEvent"
        handler="ftw.events.contents.eventlistingblock.enable_syndication"
        />

    <adapter
        factory=".syndication.EventFolderFeed"
        for="ftw.events.interfaces.IEventFolder"
        />

    <adapter
        factory=".syndication.EventListingBlockFeed"
        for="ftw.events.interfaces.IEventListingBlock"
        />

    <profilehook:hook
        profile="ftw.events:default"
        handler=".hooks.default_profile_installed"
        />

</configure>
