//------------------------------------------------------------------------------
// <copyright company="Telligent Systems">
//     Copyright (c) Telligent Systems Corporation.  All rights reserved.
// </copyright> 
//------------------------------------------------------------------------------

using CommunityServer.Galleries.Components;

namespace CommunityServer.Components.SearchBarrel
{
    public class GalleryBarrelItem : BarrelItem
    {
        public override void Format(IndexPost post)
        {
            Gallery gal = Galleries.Galleries.GetGallery(post.SectionID,true);
            if(gal != null)
                post.Url = GalleryUrls.Instance().PictureUrl(gal.ApplicationKey,post.PostID);

            post.ApplicationUrl = GalleryUrls.Instance().Home;
        }

        public override ApplicationType ApplicationType
        {
            get
            {
                return ApplicationType.Gallery;
            }
        }

    }
}