{"$schema":"https://ui.shadcn.com/schema/registry-item.json","name":"c-rating-4","type":"registry:block","title":"Rating with editable.","description":"Rating with editable.","dependencies":["sonner"],"registryDependencies":["@reui/rating"],"files":[{"path":"c-rating-4.tsx","type":"registry:block","content":"\"use client\"\n\nimport { useState } from \"react\"\nimport { Rating } from \"@/components/reui/rating\"\nimport { toast } from \"sonner\"\n\nexport function Pattern() {\n  const [productRating, setProductRating] = useState(0)\n\n  const handleRatingChange = (rating: number) => {\n    setProductRating(rating)\n\n    toast.success(\"Rated {rating} out of 5\", {\n      description: `Rated ${rating} out of 5`,\n    })\n  }\n\n  return (\n    <div className=\"space-y-8\">\n      <Rating\n        rating={productRating}\n        editable={true}\n        onRatingChange={handleRatingChange}\n        showValue={true}\n      />\n    </div>\n  )\n}","target":"components/examples/c-rating-4.tsx"}],"meta":{"order":4,"label":"Editable"}}