import { groq } from "next-sanity"; import { imageQuery } from "./shared/image"; import { bodyQuery } from "./shared/body"; import { metaQuery } from "./shared/meta"; export const SERVICE_QUERY = groq`*[_type == "service" && slug.current == $slug][0]{ _id, title, slug, targetAudience, tagline, shortDescription, pricing, features, packages[]{ name, tagline, price, badge, description, deliverables, ctaText, isPopular }, processSteps[]{ stepNumber, title, description }, faqs[]->{ _id, title, body[]{ ${bodyQuery} } }, coverImage{ ${imageQuery} }, body[]{ ${bodyQuery} }, ctaText, ctaUrl, _createdAt, _updatedAt, ${metaQuery}, }`; export const SERVICES_QUERY = groq`*[_type == "service" && defined(slug)] | order(orderRank asc, _createdAt asc){ _id, title, slug, targetAudience, tagline, shortDescription, pricing, features, coverImage{ ${imageQuery} }, ctaText, ctaUrl, }`; export const SERVICES_SLUGS_QUERY = groq`*[_type == "service" && defined(slug)]{slug}`;