import{a as e,i as t,r as n,t as r}from"./utils-n_QKOn6P.mjs";const i={path:`/squads/:squads/:innerSharedContent?`,example:`/daily/squads/watercooler`,view:0,parameters:{innerSharedContent:{description:`Where to Fetch inner Shared Posts instead of original`,default:`false`,options:[{value:`false`,label:`False`},{value:`true`,label:`True`}]}},radar:[{source:[`app.daily.dev/squads/:squads`]}],name:`Squads`,maintainers:[`Rjnishant530`],handler:a,url:`app.daily.dev/squads/discover`};async function a(i){let a=i.req.query(`limit`)?Number.parseInt(i.req.query(`limit`),10):20,o=i.req.param(`innerSharedContent`)?JSON.parse(i.req.param(`innerSharedContent`)):!1,s=i.req.param(`squads`),c=`${r}/squads/${s}`,{id:l,description:u,name:d}=await n({query:`
    query Source($handle: ID!) {
        source(id: $handle) {
            ...SquadBaseInfo
            moderationPostCount
        }
    }
    fragment SquadBaseInfo on Source {
        ...SourceBaseInfo
        referralUrl
        createdAt
        flags {
            featured
            totalPosts
            totalViews
            totalUpvotes
        }
        category {
            id
            title
            slug
        }
        ...PrivilegedMembers
    }
    fragment SourceBaseInfo on Source {
        id
        active
        handle
        name
        permalink
        public
        type
        description
        image
        membersCount
        currentMember {
            ...CurrentMember
        }
        memberPostingRole
        memberInviteRole
        moderationRequired
    }
    fragment CurrentMember on SourceMember {
        user {
            id
        }
        permissions
        role
        referralToken
        flags {
            hideFeedPosts
            collapsePinnedPosts
        }
    }
    fragment PrivilegedMembers on Source {
        privilegedMembers {
            user {
                id
                name
                image
                permalink
                username
                bio
                reputation
                companies {
                    name
                    image
                }
                contentPreference {
                    status
                }
            }
            role
        }
    }
`,variables:{handle:s}},!0),f=t(await n({query:`
    query SourceFeed($source: ID!, $loggedIn: Boolean! = false, $first: Int, $after: String, $ranking: Ranking, $supportedTypes: [String!]) {
        page: sourceFeed(source: $source, first: $first, after: $after, ranking: $ranking, supportedTypes: $supportedTypes) {
            ...FeedPostConnection
        }
    }

    fragment FeedPostConnection on PostConnection {
        pageInfo {
            hasNextPage
            endCursor
        }
        edges {
            node {
                ...FeedPost
                pinnedAt
                contentHtml
                ...UserPost @include(if: $loggedIn)
            }
        }
    }

    fragment FeedPost on Post {
        ...FeedPostInfo
        sharedPost {
            id
            title
            image
            readTime
            permalink
            commentsPermalink
            createdAt
            type
            tags
            source {
                id
                handle
                permalink
                image
            }
            slug
            clickbaitTitleDetected
        }
        trending
        feedMeta
        collectionSources {
            handle
            image
        }
        numCollectionSources
        updatedAt
        slug
    }

    fragment FeedPostInfo on Post {
        id
        title
        image
        readTime
        permalink
        commentsPermalink
        createdAt
        commented
        bookmarked
        views
        numUpvotes
        numComments
        summary
        bookmark {
            remindAt
        }
        author {
            id
            name
            image
            username
            permalink
        }
        type
        tags
        source {
            id
            handle
            name
            permalink
            image
            type
        }
        userState {
            vote
            flags {
                feedbackDismiss
            }
        }
        slug
        clickbaitTitleDetected
    }

    fragment UserPost on Post {
        read
        upvoted
        commented
        bookmarked
        downvoted
    }
`,variables:{...e,source:l,ranking:`TIME`,supportedTypes:[`article`,`share`,`freeform`,`video:youtube`,`collection`,`welcome`],first:a}}),o,!0);return{title:`${d} - daily.dev`,link:c,item:f,description:u,logo:`${r}/favicon-32x32.png`,icon:`${r}/favicon-32x32.png`,language:`en-us`}}export{i as route};