{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "timer",
  "type": "registry:ui",
  "title": "Timer",
  "dependencies": [
    "@base-ui-next/react",
    "class-variance-authority"
  ],
  "registryDependencies": [
    "https://hamur.dev/r/react/utils.json",
    "https://hamur.dev/r/react/button.json"
  ],
  "files": [
    {
      "path": "react/timer.tsx",
      "content": "'use client'\n\nimport type * as React from 'react' // base-ui-next/ui timer@0.1.0\nimport { Timer as TimerPrimitive } from '@base-ui-next/react/timer'\nimport type { VariantProps } from 'class-variance-authority'\nimport { cn } from '@/lib/utils'\nimport { buttonVariants } from '@/components/ui/button'\n\nconst timerClassName = 'flex w-fit flex-wrap items-center gap-2'\n\nconst timerLabelClassName =\n  'basis-full text-sm leading-none font-medium select-none data-disabled:opacity-50'\n\nconst timerValueClassName =\n  'basis-full py-1 text-4xl leading-none font-semibold tracking-tight tabular-nums data-disabled:opacity-50 data-overtime:text-destructive'\n\nconst timerSegmentClassName = 'tabular-nums'\n\nconst timerSegmentLabelClassName =\n  'ms-1 text-sm font-normal tracking-normal text-muted-foreground'\n\nconst timerSeparatorClassName = 'mx-px'\n\nconst timerTriggerClassName =\n  'group/timer-trigger shrink-0 aria-disabled:cursor-not-allowed aria-disabled:opacity-50'\n\nconst timerTriggerPlayClassName =\n  'hidden group-data-[action=resume]/timer-trigger:block group-data-[action=start]/timer-trigger:block group-data-[action=toggle]/timer-trigger:group-data-idle/timer-trigger:block group-data-[action=toggle]/timer-trigger:group-data-paused/timer-trigger:block'\n\nconst timerTriggerPauseClassName =\n  'hidden group-data-[action=pause]/timer-trigger:block group-data-[action=toggle]/timer-trigger:group-data-running/timer-trigger:block'\n\nconst timerTriggerRestartClassName =\n  'hidden group-data-[action=reset]/timer-trigger:block group-data-[action=restart]/timer-trigger:block group-data-[action=toggle]/timer-trigger:group-data-completed/timer-trigger:block'\n\ntype ButtonVariants = VariantProps<typeof buttonVariants>\n\nfunction SvgIcon({ children, ...props }: React.ComponentProps<'svg'>) {\n  return (\n    <svg\n      xmlns=\"http://www.w3.org/2000/svg\"\n      viewBox=\"0 0 24 24\"\n      fill=\"none\"\n      stroke=\"currentColor\"\n      strokeWidth=\"2\"\n      strokeLinecap=\"round\"\n      strokeLinejoin=\"round\"\n      aria-hidden=\"true\"\n      {...props}\n    >\n      {children}\n    </svg>\n  )\n}\n\nfunction Timer({ className, ...props }: TimerPrimitive.Root.Props) {\n  return (\n    <TimerPrimitive.Root data-slot=\"timer\" className={cn(timerClassName, className)} {...props} />\n  )\n}\n\nfunction TimerLabel({ className, ...props }: TimerPrimitive.Label.Props) {\n  return (\n    <TimerPrimitive.Label\n      data-slot=\"timer-label\"\n      className={cn(timerLabelClassName, className)}\n      {...props}\n    />\n  )\n}\n\nfunction TimerValue({ className, ...props }: TimerPrimitive.Value.Props) {\n  return (\n    <TimerPrimitive.Value\n      data-slot=\"timer-value\"\n      className={cn(timerValueClassName, className)}\n      {...props}\n    />\n  )\n}\n\nfunction TimerSegment({ className, ...props }: TimerPrimitive.Segment.Props) {\n  return (\n    <TimerPrimitive.Segment\n      data-slot=\"timer-segment\"\n      className={cn(timerSegmentClassName, className)}\n      {...props}\n    />\n  )\n}\n\nfunction TimerSegmentLabel({ className, ...props }: TimerPrimitive.SegmentLabel.Props) {\n  return (\n    <TimerPrimitive.SegmentLabel\n      data-slot=\"timer-segment-label\"\n      className={cn(timerSegmentLabelClassName, className)}\n      {...props}\n    />\n  )\n}\n\nfunction TimerSeparator({ className, ...props }: TimerPrimitive.Separator.Props) {\n  return (\n    <TimerPrimitive.Separator\n      data-slot=\"timer-separator\"\n      className={cn(timerSeparatorClassName, className)}\n      {...props}\n    />\n  )\n}\n\nfunction TimerTrigger({\n  className,\n  variant = 'outline',\n  size = 'icon',\n  children,\n  ...props\n}: TimerPrimitive.Trigger.Props & ButtonVariants) {\n  return (\n    <TimerPrimitive.Trigger\n      data-slot=\"timer-trigger\"\n      className={cn(buttonVariants({ variant, size }), timerTriggerClassName, className)}\n      {...props}\n    >\n      {children ?? (\n        <>\n          <SvgIcon className={timerTriggerPlayClassName}>\n            <path d=\"M5 5a2 2 0 0 1 3.008-1.728l11.997 6.998a2 2 0 0 1 .003 3.458l-12 7A2 2 0 0 1 5 19z\" />\n          </SvgIcon>\n          <SvgIcon className={timerTriggerPauseClassName}>\n            <rect x=\"14\" y=\"3\" width=\"5\" height=\"18\" rx=\"1\" />\n            <rect x=\"5\" y=\"3\" width=\"5\" height=\"18\" rx=\"1\" />\n          </SvgIcon>\n          <SvgIcon className={timerTriggerRestartClassName}>\n            <path d=\"M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8\" />\n            <path d=\"M3 3v5h5\" />\n          </SvgIcon>\n        </>\n      )}\n    </TimerPrimitive.Trigger>\n  )\n}\n\nexport {\n  Timer,\n  TimerLabel,\n  TimerSegment,\n  TimerSegmentLabel,\n  TimerSeparator,\n  TimerTrigger,\n  TimerValue,\n}\n",
      "type": "registry:ui",
      "target": "@ui/timer.tsx"
    }
  ],
  "meta": {
    "baseUiNext": {
      "version": "0.1.0",
      "hash": "061c0d8e466a762cb5542dbc404019d3175dadac7ab398a24bbd0820817967ea",
      "files": {
        "@ui/timer.tsx": "a06d53e5a30f4bda2e41d43bea7a16b171caf442de597fbc61cdf5645ce8599c"
      }
    }
  }
}
