/**
 * Schema Types Library - 30+ Schema Types for 2025
 * Comprehensive schema type definitions with properties and mappings
 */

import {
  HomeIcon,
  DocumentTextIcon,
  WrenchScrewdriverIcon,
  UsersIcon,
  ChartBarIcon,
  BuildingOfficeIcon,
  BriefcaseIcon,
  CalendarIcon,
  TruckIcon,
  BeakerIcon,
  ShoppingCartIcon,
  ClipboardDocumentIcon,
  ComputerDesktopIcon,
  QuestionMarkCircleIcon,
  CakeIcon,
  ChatBubbleLeftRightIcon,
  VideoCameraIcon,
  UserGroupIcon,
  HeartIcon,
  MapPinIcon,
  MapIcon,
  DocumentIcon,
  MegaphoneIcon,
  MicrophoneIcon,
  BuildingStorefrontIcon,
  TagIcon,
  PlayCircleIcon,
  AcademicCapIcon,
} from '@heroicons/react/24/outline';
import { StarIcon } from '@heroicons/react/24/solid';

export const schemaTypes = {
  // Content Schemas
  Article: {
    label: 'Article',
    icon: DocumentIcon,
    category: 'Content',
    description: 'General article or blog post',
    properties: {
      headline: { label: 'Headline', type: 'text', required: true, autoMap: 'post_title' },
      description: { label: 'Description', type: 'textarea', autoMap: 'post_excerpt' },
      articleBody: { label: 'Content', type: 'content', autoMap: 'post_content' },
      author: { label: 'Author', type: 'person', autoMap: 'post_author' },
      datePublished: { label: 'Published Date', type: 'date', autoMap: 'post_date' },
      dateModified: { label: 'Modified Date', type: 'date', autoMap: 'post_modified' },
      image: { label: 'Featured Image', type: 'image', autoMap: 'featured_image' },
      articleSection: { label: 'Section', type: 'select', options: ['Technology', 'Business', 'Health', 'Lifestyle', 'News'] },
      wordCount: { label: 'Word Count', type: 'number', autoDetect: true },
      keywords: { label: 'Keywords', type: 'tags', autoMap: 'post_tags' }
    }
  },
  
  BlogPosting: {
    label: 'Blog Post',
    icon: DocumentTextIcon,
    category: 'Content',
    description: 'Blog post with comments and social features',
    extends: 'Article',
    properties: {
      commentCount: { label: 'Comment Count', type: 'number', autoDetect: true },
      discussionUrl: { label: 'Discussion URL', type: 'url', autoMap: 'post_url' }
    }
  },
  
  NewsArticle: {
    label: 'News Article',
    icon: MegaphoneIcon,
    category: 'Content',
    description: 'News and journalism content',
    extends: 'Article',
    properties: {
      dateline: { label: 'Dateline', type: 'text' },
      printEdition: { label: 'Print Edition', type: 'text' },
      printPage: { label: 'Print Page', type: 'text' },
      printSection: { label: 'Print Section', type: 'text' }
    }
  },

  TechArticle: {
    label: 'Tech Article',
    icon: DocumentTextIcon,
    category: 'Content',
    description: 'Technical articles and documentation',
    extends: 'Article',
    properties: {
      dependencies: { label: 'Dependencies', type: 'text' },
      proficiencyLevel: { label: 'Proficiency Level', type: 'select', options: ['Beginner', 'Intermediate', 'Advanced'] }
    }
  },
  
  Report: {
    label: 'Report',
    icon: ChartBarIcon,
    category: 'Content',
    description: 'Research reports and whitepapers',
    extends: 'Article',
    properties: {
      reportNumber: { label: 'Report Number', type: 'text' },
      institution: { label: 'Institution', type: 'text' }
    }
  },
  
  ScholarlyArticle: {
    label: 'Scholarly Article',
    icon: AcademicCapIcon,
    category: 'Content',
    description: 'Academic and research papers',
    extends: 'Article',
    properties: {
      citation: { label: 'Citation', type: 'textarea' },
      academicJournal: { label: 'Journal', type: 'text' },
      doi: { label: 'DOI', type: 'text' }
    }
  },

  Book: {
    label: 'Book',
    icon: DocumentTextIcon,
    category: 'Content',
    description: 'Books, ebooks, and publications',
    properties: {
      name: { label: 'Book Title', type: 'text', required: true },
      author: { label: 'Author', type: 'person', required: true },
      isbn: { label: 'ISBN', type: 'text' },
      bookEdition: { label: 'Edition', type: 'text' },
      numberOfPages: { label: 'Number of Pages', type: 'number' },
      publisher: { label: 'Publisher', type: 'organization' },
      datePublished: { label: 'Published Date', type: 'date' },
      image: { label: 'Cover Image', type: 'image' },
      description: { label: 'Description', type: 'textarea' }
    }
  },

  // Commerce Schemas
  Product: {
    label: 'Product',
    icon: ShoppingCartIcon,
    category: 'Commerce',
    description: 'Physical or digital products',
    properties: {
      name: { label: 'Product Name', type: 'text', required: true, autoMap: 'post_title' },
      description: { label: 'Description', type: 'textarea', autoMap: 'post_excerpt' },
      image: { label: 'Product Image', type: 'image', autoMap: 'featured_image' },
      brand: { label: 'Brand', type: 'text', autoMap: 'product_brand' },
      sku: { label: 'SKU', type: 'text', autoMap: 'sku' },
      gtin: { label: 'GTIN/UPC', type: 'text', autoMap: 'gtin' },
      mpn: { label: 'MPN', type: 'text', autoMap: 'mpn' },
      price: { label: 'Price', type: 'price', required: true, autoMap: 'price' },
      priceCurrency: { label: 'Currency', type: 'select', options: ['USD', 'EUR', 'GBP', 'CAD', 'AUD'], autoMap: 'currency' },
      availability: { label: 'Availability', type: 'select', options: ['InStock', 'OutOfStock', 'PreOrder', 'BackOrder'], autoMap: 'stock_status' },
      condition: { label: 'Condition', type: 'select', options: ['New', 'Used', 'Refurbished'] },
      aggregateRating: { label: 'Rating', type: 'rating', autoMap: 'product_rating' },
      review: { label: 'Reviews', type: 'reviews', autoMap: 'product_reviews' }
    }
  },
  
  Service: {
    label: 'Service',
    icon: WrenchScrewdriverIcon,
    category: 'Commerce',
    description: 'Professional services and offerings',
    properties: {
      name: { label: 'Service Name', type: 'text', required: true },
      description: { label: 'Description', type: 'textarea' },
      provider: { label: 'Service Provider', type: 'organization' },
      serviceType: { label: 'Service Type', type: 'text' },
      areaServed: { label: 'Service Area', type: 'text' },
      hasOfferCatalog: { label: 'Service Catalog', type: 'url' }
    }
  },

  ProfessionalService: {
    label: 'Professional Service',
    icon: WrenchScrewdriverIcon,
    category: 'Commerce',
    description: 'Professional services such as legal, consulting, or medical',
    extends: 'Service',
    properties: {
      knowsAbout: { label: 'Expertise', type: 'text' },
      areaServed: { label: 'Service Area', type: 'text' }
    }
  },
  
  Offer: {
    label: 'Offer',
    icon: TagIcon,
    category: 'Commerce',
    description: 'Special offers and deals',
    properties: {
      name: { label: 'Offer Name', type: 'text', required: true },
      description: { label: 'Description', type: 'textarea' },
      price: { label: 'Price', type: 'price' },
      priceCurrency: { label: 'Currency', type: 'select', options: ['USD', 'EUR', 'GBP'] },
      validFrom: { label: 'Valid From', type: 'date' },
      validThrough: { label: 'Valid Until', type: 'date' },
      availability: { label: 'Availability', type: 'select', options: ['InStock', 'OutOfStock', 'LimitedAvailability'] }
    }
  },
  
  Vehicle: {
    label: 'Vehicle',
    icon: TruckIcon,
    category: 'Commerce',
    description: 'Cars, trucks, and other vehicles',
    extends: 'Product',
    properties: {
      vehicleModelDate: { label: 'Model Year', type: 'text' },
      vehicleConfiguration: { label: 'Configuration', type: 'text' },
      vehicleEngine: { label: 'Engine', type: 'text' },
      vehicleTransmission: { label: 'Transmission', type: 'text' },
      mileageFromOdometer: { label: 'Mileage', type: 'number' },
      fuelType: { label: 'Fuel Type', type: 'select', options: ['Gasoline', 'Diesel', 'Electric', 'Hybrid'] }
    }
  },

  VehicleListing: {
    label: 'Vehicle Listing',
    icon: TruckIcon,
    category: 'Commerce',
    description: 'Vehicle listings for sale or lease',
    extends: 'Vehicle',
    properties: {
      price: { label: 'Listing Price', type: 'price' },
      availability: { label: 'Availability', type: 'select', options: ['InStock', 'OutOfStock', 'SoldOut'] },
      seller: { label: 'Seller', type: 'organization' }
    }
  },

  // Local Business Schemas
  LocalBusiness: {
    label: 'Local Business',
    icon: BuildingStorefrontIcon,
    category: 'Local',
    description: 'Physical business locations',
    properties: {
      name: { label: 'Business Name', type: 'text', required: true },
      description: { label: 'Description', type: 'textarea' },
      image: { label: 'Business Image', type: 'image' },
      address: { label: 'Address', type: 'address', required: true },
      telephone: { label: 'Phone', type: 'tel' },
      email: { label: 'Email', type: 'email' },
      url: { label: 'Website', type: 'url' },
      openingHours: { label: 'Opening Hours', type: 'openingHours' },
      priceRange: { label: 'Price Range', type: 'select', options: ['$', '$$', '$$$', '$$$$'] },
      paymentAccepted: { label: 'Payment Methods', type: 'multiselect', options: ['Cash', 'Credit Card', 'Debit Card', 'PayPal'] },
      currenciesAccepted: { label: 'Currencies', type: 'text' },
      aggregateRating: { label: 'Rating', type: 'rating' }
    }
  },
  
  Restaurant: {
    label: 'Restaurant',
    icon: CakeIcon,
    category: 'Local',
    description: 'Restaurants and food establishments',
    extends: 'LocalBusiness',
    properties: {
      servesCuisine: { label: 'Cuisine Type', type: 'text' },
      menu: { label: 'Menu URL', type: 'url' },
      acceptsReservations: { label: 'Takes Reservations', type: 'boolean' },
      hasMenu: { label: 'Menu Available', type: 'boolean' }
    }
  },
  
  Store: {
    label: 'Store',
    icon: ShoppingCartIcon,
    category: 'Local',
    description: 'Retail stores and shops',
    extends: 'LocalBusiness',
    properties: {
      branchOf: { label: 'Parent Company', type: 'organization' },
      makesOffer: { label: 'Products/Services', type: 'text' }
    }
  },
  
  Hotel: {
    label: 'Hotel',
    icon: BuildingOfficeIcon,
    category: 'Local',
    description: 'Hotels and lodging',
    extends: 'LocalBusiness',
    properties: {
      starRating: { label: 'Star Rating', type: 'rating' },
      checkinTime: { label: 'Check-in Time', type: 'time' },
      checkoutTime: { label: 'Check-out Time', type: 'time' },
      petsAllowed: { label: 'Pets Allowed', type: 'boolean' },
      amenityFeature: { label: 'Amenities', type: 'multiselect', options: ['WiFi', 'Parking', 'Pool', 'Gym', 'Restaurant', 'Bar'] }
    }
  },
  
  TouristAttraction: {
    label: 'Tourist Attraction',
    icon: MapPinIcon,
    category: 'Local',
    description: 'Tourist destinations and attractions',
    properties: {
      name: { label: 'Attraction Name', type: 'text', required: true },
      description: { label: 'Description', type: 'textarea' },
      image: { label: 'Images', type: 'gallery' },
      address: { label: 'Location', type: 'address' },
      openingHours: { label: 'Opening Hours', type: 'openingHours' },
      isAccessibleForFree: { label: 'Free Entry', type: 'boolean' },
      publicAccess: { label: 'Public Access', type: 'boolean' },
      touristType: { label: 'Tourist Type', type: 'text' }
    }
  },

  // Event Schemas
  Event: {
    label: 'Event',
    icon: CalendarIcon,
    category: 'Events',
    description: 'General events and happenings',
    properties: {
      name: { label: 'Event Name', type: 'text', required: true },
      description: { label: 'Description', type: 'textarea' },
      image: { label: 'Event Image', type: 'image' },
      startDate: { label: 'Start Date', type: 'datetime', required: true },
      endDate: { label: 'End Date', type: 'datetime' },
      location: { label: 'Location', type: 'place' },
      organizer: { label: 'Organizer', type: 'organization' },
      performer: { label: 'Performers', type: 'person' },
      eventStatus: { label: 'Status', type: 'select', options: ['Scheduled', 'Cancelled', 'Postponed', 'Rescheduled'] },
      eventAttendanceMode: { label: 'Attendance Mode', type: 'select', options: ['Offline', 'Online', 'Mixed'] },
      offers: { label: 'Ticket Info', type: 'offer' }
    }
  },
  
  Course: {
    label: 'Course',
    icon: AcademicCapIcon,
    category: 'Events',
    description: 'Educational courses and training',
    properties: {
      name: { label: 'Course Name', type: 'text', required: true },
      description: { label: 'Description', type: 'textarea' },
      provider: { label: 'Course Provider', type: 'organization' },
      courseMode: { label: 'Course Mode', type: 'select', options: ['Online', 'Onsite', 'Blended'] },
      duration: { label: 'Duration', type: 'text' },
      startDate: { label: 'Start Date', type: 'date' },
      endDate: { label: 'End Date', type: 'date' },
      coursePrerequisites: { label: 'Prerequisites', type: 'text' },
      educationalLevel: { label: 'Level', type: 'select', options: ['Beginner', 'Intermediate', 'Advanced'] }
    }
  },
  
  Webinar: {
    label: 'Webinar',
    icon: PlayCircleIcon,
    category: 'Events',
    description: 'Online webinars and virtual events',
    extends: 'Event',
    properties: {
      webinarUrl: { label: 'Webinar URL', type: 'url' },
      recordingUrl: { label: 'Recording URL', type: 'url' },
      requiresRegistration: { label: 'Registration Required', type: 'boolean' }
    }
  },

  // Media Schemas
  VideoObject: {
    label: 'Video',
    icon: PlayCircleIcon,
    category: 'Media',
    description: 'Videos and video content',
    properties: {
      name: { label: 'Video Title', type: 'text', required: true },
      description: { label: 'Description', type: 'textarea' },
      thumbnailUrl: { label: 'Thumbnail', type: 'image', required: true },
      uploadDate: { label: 'Upload Date', type: 'date', required: true },
      duration: { label: 'Duration', type: 'duration' },
      contentUrl: { label: 'Video URL', type: 'url' },
      embedUrl: { label: 'Embed URL', type: 'url' },
      interactionStatistic: { label: 'View Count', type: 'number' }
    }
  },

  Podcast: {
    label: 'Podcast Series',
    icon: MicrophoneIcon,
    category: 'Media',
    description: 'Podcast series or show information',
    properties: {
      name: { label: 'Podcast Name', type: 'text', required: true },
      description: { label: 'Description', type: 'textarea' },
      url: { label: 'Podcast URL', type: 'url' },
      image: { label: 'Podcast Image', type: 'image' },
      author: { label: 'Author', type: 'person' },
      publisher: { label: 'Publisher', type: 'organization' },
      inLanguage: { label: 'Language', type: 'text' }
    }
  },

  ImageObject: {
    label: 'Image',
    icon: DocumentIcon,
    category: 'Media',
    description: 'Standalone image object',
    properties: {
      name: { label: 'Image Title', type: 'text' },
      url: { label: 'Image URL', type: 'url', required: true },
      caption: { label: 'Caption', type: 'text' },
      creator: { label: 'Creator', type: 'person' }
    }
  },

  AudioObject: {
    label: 'Audio',
    icon: MicrophoneIcon,
    category: 'Media',
    description: 'Standalone audio object',
    properties: {
      name: { label: 'Audio Title', type: 'text' },
      url: { label: 'Audio URL', type: 'url', required: true },
      duration: { label: 'Duration', type: 'duration' },
      encodingFormat: { label: 'Format', type: 'text' }
    }
  },

  ImageLicense: {
    label: 'Image License',
    icon: DocumentIcon,
    category: 'Media',
    description: 'Image license and usage information',
    properties: {
      name: { label: 'Image Name', type: 'text' },
      image: { label: 'Image URL', type: 'url', required: true },
      license: { label: 'License URL', type: 'url' },
      creator: { label: 'Creator', type: 'person' },
      creditText: { label: 'Credit Text', type: 'text' }
    }
  },

  MovieCarousel: {
    label: 'Movie Carousel',
    icon: VideoCameraIcon,
    category: 'Media',
    description: 'Carousel of movies',
    properties: {
      name: { label: 'Carousel Name', type: 'text' },
      itemListElement: { label: 'Movies (IDs or URLs)', type: 'list' }
    }
  },
  
  PodcastEpisode: {
    label: 'Podcast Episode',
    icon: MicrophoneIcon,
    category: 'Media',
    description: 'Podcast episodes and audio content',
    properties: {
      name: { label: 'Episode Title', type: 'text', required: true },
      description: { label: 'Description', type: 'textarea' },
      url: { label: 'Episode URL', type: 'url' },
      datePublished: { label: 'Publish Date', type: 'date' },
      duration: { label: 'Duration', type: 'duration' },
      episodeNumber: { label: 'Episode Number', type: 'number' },
      seasonNumber: { label: 'Season Number', type: 'number' },
      partOfSeries: { label: 'Podcast Series', type: 'text' },
      audio: { label: 'Audio URL', type: 'url' }
    }
  },

  // Recipe Schema
  Recipe: {
    label: 'Recipe',
    icon: BeakerIcon,
    category: 'Content',
    description: 'Cooking recipes and instructions',
    properties: {
      name: { label: 'Recipe Name', type: 'text', required: true },
      description: { label: 'Description', type: 'textarea' },
      image: { label: 'Recipe Image', type: 'image' },
      author: { label: 'Recipe Author', type: 'person' },
      datePublished: { label: 'Published Date', type: 'date' },
      prepTime: { label: 'Prep Time', type: 'duration' },
      cookTime: { label: 'Cook Time', type: 'duration' },
      totalTime: { label: 'Total Time', type: 'duration' },
      recipeYield: { label: 'Servings', type: 'text' },
      recipeCategory: { label: 'Category', type: 'text' },
      recipeCuisine: { label: 'Cuisine', type: 'text' },
      recipeIngredient: { label: 'Ingredients', type: 'list' },
      recipeInstructions: {
        label: 'Instructions',
        type: 'repeater',
        itemType: 'HowToStep',
        subFields: [
          { label: 'Instruction Text', path: 'text' }
        ]
      },
      nutrition: { label: 'Nutrition Info', type: 'nutrition' },
      aggregateRating: { label: 'Rating', type: 'rating' }
    }
  },

  // FAQ and How-To Schemas
  FAQPage: {
    label: 'FAQ Page',
    icon: QuestionMarkCircleIcon,
    category: 'Q&A',
    description: 'Frequently asked questions',
    properties: {
      mainEntity: {
        label: 'Questions',
        type: 'repeater',
        itemType: 'Question',
        autoDetect: true,
        nestedTypes: {
          acceptedAnswer: 'Answer'
        },
        subFields: [
          { label: 'Question', path: 'name' },
          { label: 'Answer', path: 'acceptedAnswer.text' }
        ]
      }
    }
  },
  
  HowTo: {
    label: 'How-To Guide',
    icon: ClipboardDocumentIcon,
    category: 'Q&A',
    description: 'Step-by-step instructions',
    properties: {
      name: { label: 'Guide Title', type: 'text', required: true },
      description: { label: 'Description', type: 'textarea' },
      image: { label: 'Guide Image', type: 'image' },
      totalTime: { label: 'Total Time', type: 'duration' },
      estimatedCost: { label: 'Estimated Cost', type: 'price' },
      supply: { label: 'Materials Needed', type: 'list' },
      tool: { label: 'Tools Required', type: 'list' },
      step: {
        label: 'Steps',
        type: 'repeater',
        itemType: 'HowToStep',
        required: true,
        subFields: [
          { label: 'Step Title', path: 'name' },
          { label: 'Step Description', path: 'text' },
          { label: 'Step URL', path: 'url' }
        ]
      }
    }
  },
  
  QAPage: {
    label: 'Q&A Page',
    icon: ChatBubbleLeftRightIcon,
    category: 'Q&A',
    description: 'Question and answer pages',
    properties: {
      mainEntity: { label: 'Question', type: 'question' },
      acceptedAnswer: { label: 'Answer', type: 'answer' },
      suggestedAnswer: { label: 'Other Answers', type: 'answers' }
    }
  },

  // Job Schemas
  JobPosting: {
    label: 'Job Posting',
    icon: BriefcaseIcon,
    category: 'Jobs',
    description: 'Job listings and career opportunities',
    properties: {
      title: { label: 'Job Title', type: 'text', required: true },
      description: { label: 'Job Description', type: 'textarea', required: true },
      datePosted: { label: 'Posted Date', type: 'date', required: true },
      validThrough: { label: 'Application Deadline', type: 'date' },
      employmentType: { label: 'Employment Type', type: 'multiselect', options: ['FULL_TIME', 'PART_TIME', 'CONTRACT', 'TEMPORARY', 'INTERN'] },
      hiringOrganization: { label: 'Company', type: 'organization', required: true },
      jobLocation: { label: 'Job Location', type: 'address', required: true },
      baseSalary: { label: 'Salary Range', type: 'salary' },
      experienceRequirements: { label: 'Experience Required', type: 'text' },
      qualifications: { label: 'Qualifications', type: 'text' },
      responsibilities: { label: 'Responsibilities', type: 'text' },
      skills: { label: 'Required Skills', type: 'text' },
      benefits: { label: 'Benefits', type: 'text' },
      applicantLocationRequirements: { label: 'Location Requirements', type: 'text' }
    }
  },

  // Organization and Person Schemas
  Organization: {
    label: 'Organization',
    icon: BuildingOfficeIcon,
    category: 'Entities',
    description: 'Companies and organizations',
    properties: {
      name: { label: 'Organization Name', type: 'text', required: true },
      url: { label: 'Website', type: 'url' },
      logo: { label: 'Logo', type: 'image' },
      description: { label: 'Description', type: 'textarea' },
      address: { label: 'Address', type: 'address' },
      telephone: { label: 'Phone', type: 'tel' },
      email: { label: 'Email', type: 'email' },
      sameAs: { label: 'Social Profiles', type: 'socialProfiles' },
      founder: { label: 'Founder', type: 'person' },
      foundingDate: { label: 'Founded Date', type: 'date' },
      numberOfEmployees: { label: 'Number of Employees', type: 'number' }
    }
  },
  
  Person: {
    label: 'Person',
    icon: UsersIcon,
    category: 'Entities',
    description: 'Individual people and authors',
    properties: {
      name: { label: 'Full Name', type: 'text', required: true },
      image: { label: 'Photo', type: 'image' },
      url: { label: 'Website', type: 'url' },
      jobTitle: { label: 'Job Title', type: 'text' },
      worksFor: { label: 'Organization', type: 'organization' },
      description: { label: 'Bio', type: 'textarea' },
      email: { label: 'Email', type: 'email' },
      telephone: { label: 'Phone', type: 'tel' },
      sameAs: { label: 'Social Profiles', type: 'socialProfiles' }
    }
  },

  // Review Schemas
  Review: {
    label: 'Review',
    icon: StarIcon,
    category: 'Reviews',
    description: 'Product or service reviews',
    properties: {
      itemReviewed: { label: 'Item Reviewed', type: 'text', required: true },
      reviewRating: { label: 'Rating', type: 'rating', required: true },
      name: { label: 'Review Title', type: 'text' },
      author: { label: 'Reviewer', type: 'person' },
      datePublished: { label: 'Review Date', type: 'date' },
      reviewBody: { label: 'Review Text', type: 'textarea' }
    }
  },
  
  AggregateRating: {
    label: 'Aggregate Rating',
    icon: StarIcon,
    category: 'Reviews',
    description: 'Combined ratings from multiple reviews',
    properties: {
      ratingValue: { label: 'Average Rating', type: 'number', required: true, autoMap: 'user_rating_avg' },
      bestRating: { label: 'Best Rating', type: 'number' },
      worstRating: { label: 'Worst Rating', type: 'number' },
      ratingCount: { label: 'Total Ratings', type: 'number', autoMap: 'user_rating_count' },
      reviewCount: { label: 'Total Reviews', type: 'number' }
    }
  },

  // Real Estate Schemas
  RealEstateListing: {
    label: 'Real Estate Listing',
    icon: HomeIcon,
    category: 'Real Estate',
    description: 'Property listings',
    properties: {
      name: { label: 'Property Title', type: 'text', required: true },
      description: { label: 'Description', type: 'textarea' },
      image: { label: 'Property Images', type: 'gallery' },
      price: { label: 'Price', type: 'price' },
      address: { label: 'Property Address', type: 'address' },
      numberOfRooms: { label: 'Total Rooms', type: 'number' },
      numberOfBedrooms: { label: 'Bedrooms', type: 'number' },
      numberOfBathrooms: { label: 'Bathrooms', type: 'number' },
      floorSize: { label: 'Floor Size (sq ft)', type: 'number' },
      yearBuilt: { label: 'Year Built', type: 'number' },
      propertyType: { label: 'Property Type', type: 'select', options: ['House', 'Apartment', 'Condo', 'Townhouse', 'Land'] }
    }
  },

  // Medical Schemas (Use with caution - medical content requires expertise)
  MedicalCondition: {
    label: 'Medical Condition',
    icon: HeartIcon,
    category: 'Medical',
    description: 'Medical conditions and health topics',
    properties: {
      name: { label: 'Condition Name', type: 'text', required: true },
      description: { label: 'Description', type: 'textarea' },
      symptoms: { label: 'Symptoms', type: 'text' },
      causes: { label: 'Causes', type: 'text' },
      riskFactors: { label: 'Risk Factors', type: 'text' },
      treatment: { label: 'Treatment Options', type: 'text' },
      medicalSpecialty: { label: 'Medical Specialty', type: 'text' }
    }
  },

  // Software Application
  SoftwareApplication: {
    label: 'Software Application',
    icon: ComputerDesktopIcon,
    category: 'Software',
    description: 'Software, apps, and digital tools',
    properties: {
      name: { label: 'App Name', type: 'text', required: true },
      description: { label: 'Description', type: 'textarea' },
      applicationCategory: { label: 'Category', type: 'text' },
      operatingSystem: { label: 'Operating System', type: 'text' },
      offers: { label: 'Pricing', type: 'offer' },
      aggregateRating: { label: 'Rating', type: 'rating' },
      screenshot: { label: 'Screenshots', type: 'gallery' },
      downloadUrl: { label: 'Download URL', type: 'url' },
      fileSize: { label: 'File Size', type: 'text' },
      softwareVersion: { label: 'Version', type: 'text' },
      softwareRequirements: { label: 'System Requirements', type: 'text' }
    }
  },

  Dataset: {
    label: 'Dataset',
    icon: ChartBarIcon,
    category: 'Utilities',
    description: 'Datasets and data collections',
    properties: {
      name: { label: 'Dataset Name', type: 'text', required: true },
      description: { label: 'Description', type: 'textarea' },
      url: { label: 'Dataset URL', type: 'url' },
      license: { label: 'License URL', type: 'url' },
      creator: { label: 'Creator', type: 'person' },
      keywords: { label: 'Keywords', type: 'tags' }
    }
  },

  ClaimReview: {
    label: 'Claim Review',
    icon: StarIcon,
    category: 'Reviews',
    description: 'Fact-checking and claim reviews',
    properties: {
      claimReviewed: { label: 'Claim Reviewed', type: 'textarea', required: true },
      datePublished: { label: 'Published Date', type: 'date' },
      author: { label: 'Author', type: 'organization' },
      reviewRating: { label: 'Rating', type: 'rating' },
      url: { label: 'Review URL', type: 'url' }
    }
  },

  CustomMarkup: {
    label: 'Custom JSON-LD',
    icon: DocumentTextIcon,
    category: 'Utilities',
    description: 'Paste your own JSON-LD schema',
    properties: {
      customMarkup: { label: 'Custom JSON-LD', type: 'json', required: true }
    }
  },

  // Latest Schema.org types
  DiscussionForumPosting: {
    label: 'Discussion Forum Post',
    icon: ChatBubbleLeftRightIcon,
    category: '2025 Types',
    description: 'Forum threads and discussion posts (latest Schema.org type)',
    extends: 'Article',
    properties: {
      headline: { label: 'Post Title', type: 'text', required: true, autoMap: 'post_title' },
      text: { label: 'Post Content', type: 'textarea', autoMap: 'post_content' },
      author: { label: 'Author', type: 'person', required: true, autoMap: 'post_author' },
      datePublished: { label: 'Posted Date', type: 'date', autoMap: 'post_date' },
      interactionStatistic: { label: 'Interaction Stats', type: 'object' },
      sharedContent: { label: 'Shared Content', type: 'url' },
      replyToUrl: { label: 'Reply To URL', type: 'url' }
    }
  },

  ProfilePage: {
    label: 'Profile Page',
    icon: UsersIcon,
    category: '2025 Types',
    description: 'User or author profile pages (latest Schema.org type)',
    extends: 'WebPage',
    properties: {
      mainEntity: { label: 'Profile Subject', type: 'person', required: true },
      name: { label: 'Page Title', type: 'text', autoMap: 'post_title' },
      description: { label: 'Page Description', type: 'textarea', autoMap: 'post_excerpt' },
      image: { label: 'Profile Image', type: 'image', autoMap: 'featured_image' },
      dateCreated: { label: 'Profile Created', type: 'date' },
      dateModified: { label: 'Last Updated', type: 'date', autoMap: 'post_modified' }
    }
  },

  AboutPage: {
    label: 'About Page',
    icon: DocumentIcon,
    category: 'Navigation',
    description: 'About page schema',
    extends: 'WebPage',
    properties: {
      name: { label: 'Page Title', type: 'text', autoMap: 'post_title' },
      description: { label: 'Description', type: 'textarea', autoMap: 'post_excerpt' }
    }
  },

  ContactPage: {
    label: 'Contact Page',
    icon: MapPinIcon,
    category: 'Navigation',
    description: 'Contact page schema',
    extends: 'WebPage',
    properties: {
      name: { label: 'Page Title', type: 'text', autoMap: 'post_title' },
      description: { label: 'Description', type: 'textarea', autoMap: 'post_excerpt' },
      contactPoint: { label: 'Contact Point', type: 'organization' }
    }
  },

  SiteNavigationElement: {
    label: 'Site Navigation',
    icon: MapIcon,
    category: 'Navigation',
    description: 'Site navigation menu items',
    properties: {
      name: { label: 'Navigation Label', type: 'text' },
      url: { label: 'Navigation URL', type: 'url' }
    }
  },

  BreadcrumbList: {
    label: 'Breadcrumb Navigation',
    icon: MapIcon,
    category: 'Navigation',
    description: 'Navigation breadcrumb trail for site structure',
    properties: {
      itemListElement: { label: 'Breadcrumb Items', type: 'breadcrumbItems', required: true, autoDetect: true }
    }
  },

  WebPage: {
    label: 'Web Page',
    icon: DocumentIcon,
    category: 'Navigation',
    description: 'Generic web page markup',
    properties: {
      name: { label: 'Page Title', type: 'text', required: true, autoMap: 'post_title' },
      description: { label: 'Description', type: 'textarea', autoMap: 'post_excerpt' },
      url: { label: 'Page URL', type: 'url', autoMap: 'post_url' },
      image: { label: 'Featured Image', type: 'image', autoMap: 'featured_image' },
      datePublished: { label: 'Published Date', type: 'date', autoMap: 'post_date' },
      dateModified: { label: 'Modified Date', type: 'date', autoMap: 'post_modified' },
      isPartOf: { label: 'Part Of Website', type: 'website' }
    }
  },

  WebSite: {
    label: 'Website',
    icon: HomeIcon,
    category: 'Navigation',
    description: 'Website-level markup with search action',
    properties: {
      name: { label: 'Site Name', type: 'text', required: true },
      url: { label: 'Site URL', type: 'url', required: true },
      description: { label: 'Site Description', type: 'textarea' },
      potentialAction: { label: 'Search Action', type: 'searchAction' },
      publisher: { label: 'Publisher', type: 'organization' }
    }
  }
};

// Schema categories for grouping
export const schemaCategories = {
  Content: {
    label: 'Content & Articles',
    icon: DocumentIcon,
    schemas: ['Article', 'BlogPosting', 'NewsArticle', 'TechArticle', 'Report', 'ScholarlyArticle', 'Book', 'Recipe']
  },
  Commerce: {
    label: 'E-Commerce & Products',
    icon: ShoppingCartIcon,
    schemas: ['Product', 'Service', 'ProfessionalService', 'Offer', 'Vehicle', 'VehicleListing']
  },
  Local: {
    label: 'Local Business',
    icon: MapIcon,
    schemas: ['LocalBusiness', 'Restaurant', 'Store', 'Hotel', 'TouristAttraction']
  },
  Events: {
    label: 'Events & Courses',
    icon: CalendarIcon,
    schemas: ['Event', 'Course', 'Webinar']
  },
  Media: {
    label: 'Media & Videos',
    icon: VideoCameraIcon,
    schemas: ['VideoObject', 'Podcast', 'PodcastEpisode', 'ImageObject', 'AudioObject', 'ImageLicense', 'MovieCarousel']
  },
  'Q&A': {
    label: 'FAQ & How-To',
    icon: QuestionMarkCircleIcon,
    schemas: ['FAQPage', 'HowTo', 'QAPage']
  },
  Jobs: {
    label: 'Jobs & Careers',
    icon: BriefcaseIcon,
    schemas: ['JobPosting']
  },
  Entities: {
    label: 'Organizations & People',
    icon: UserGroupIcon,
    schemas: ['Organization', 'Person']
  },
  Reviews: {
    label: 'Reviews & Ratings',
    icon: StarIcon,
    schemas: ['Review', 'AggregateRating', 'ClaimReview']
  },
  'Real Estate': {
    label: 'Real Estate',
    icon: HomeIcon,
    schemas: ['RealEstateListing']
  },
  Medical: {
    label: 'Medical & Health',
    icon: HeartIcon,
    schemas: ['MedicalCondition']
  },
  Software: {
    label: 'Software & Apps',
    icon: ComputerDesktopIcon,
    schemas: ['SoftwareApplication']
  },
  Navigation: {
    label: 'Navigation & Structure',
    icon: MapIcon,
    schemas: ['BreadcrumbList', 'WebPage', 'WebSite', 'AboutPage', 'ContactPage', 'SiteNavigationElement']
  },
  Utilities: {
    label: 'Utilities & Custom',
    icon: DocumentTextIcon,
    schemas: ['Dataset', 'CustomMarkup']
  },
  '2025 Types': {
    label: 'Latest Schema.org Types',
    icon: DocumentTextIcon,
    schemas: ['DiscussionForumPosting', 'ProfilePage']
  }
};

// Helper function to get schema by type
export const getSchemaType = (type) => {
  return schemaTypes[type] || null;
};

// Helper function to get schemas by category
export const getSchemasByCategory = (category) => {
  const categoryData = schemaCategories[category];
  if (!categoryData) return [];
  
  return categoryData.schemas.map(schemaType => ({
    type: schemaType,
    ...schemaTypes[schemaType]
  }));
};

// Helper function to get all available schemas
export const getAllSchemas = () => {
  return Object.keys(schemaTypes).map(type => ({
    type,
    ...schemaTypes[type]
  }));
};

// Helper function to inherit properties from parent schema
export const getSchemaProperties = (type) => {
  const schema = schemaTypes[type];
  if (!schema) return {};
  
  let properties = { ...schema.properties };
  
  // If schema extends another, merge parent properties
  if (schema.extends && schemaTypes[schema.extends]) {
    const parentProperties = getSchemaProperties(schema.extends);
    properties = { ...parentProperties, ...properties };
  }
  
  return properties;
};

// Export for use in components
export default {
  schemaTypes,
  schemaCategories,
  getSchemaType,
  getSchemasByCategory,
  getAllSchemas,
  getSchemaProperties
};
