# mergeProps

Merges user host props with component-required internal props.

## Signatures

```ts
export declare function mergeProps<const User extends object | undefined, const Internal extends object>(user: User, internal: Internal): MergedHostProps<User, Internal>;
```

## Why

Internal accessibility/state props must remain authoritative, but user
events still run first and may cancel component behavior. Disabled hosts
suppress user activation handlers. Refs compose instead of overwriting one
another.

## Ownership and lifetime

The function allocates only a merged object. Listener and ref effects are
run by the eventual template Scope. `composeRefs` rejects two hydration
owners because one element can restore only one hydration protocol.

## Examples

```ts
import { mergeProps } from "@typed/ui/Dom/Props"
import { EventHandler } from "@typed/template"
import { Effect } from "effect"

const props = mergeProps(
  {
    class: "external",
    onclick: EventHandler.make(() => Effect.log("user activation"))
  },
  { role: "button", "aria-disabled": false }
)
```
