import { useState } from 'react'

/**
 * A minimal counter component that demonstrates basic React state handling.
 *
 * Maintains an internal count value and provides buttons to increment and reset it.
 *
 * @returns A JSX element rendering the counter UI.
 */
function Counter() {
  /** The current counter value. */
  const [count, setCount] = useState(0)

  return (
    <div className="card">
      <button onClick={() => setCount((count) => count + 1)}>
        count is {count}
      </button>
      <button className='reset' onClick={() => setCount(0)}>
        Reset Counter
      </button>
    </div>
  )
}
export default Counter