## class: `WyFilenameInput`, `wy-filename-input`

Internal filename prompt shared by file creation components.

### Methods

| Name   | Description                                                   | Parameters                                   | Return | Inherited From |
| ------ | ------------------------------------------------------------- | -------------------------------------------- | ------ | -------------- |
| `open` | Prompt for a filename, replacing any previous pending prompt. | `ext: string, submit: FilenameSubmitHandler` |        |                |

<details><summary>Private API</summary>

### Fields

| Name              | Privacy   | Type                                                   | Default                           | Description                                                                      | Inherited From |
| ----------------- | --------- | ------------------------------------------------------ | --------------------------------- | -------------------------------------------------------------------------------- | -------------- |
| `exportParts`     | protected |                                                        | `new ShadowPartsController(this)` |                                                                                  |                |
| `show`            | private   | `boolean`                                              | `false`                           |                                                                                  |                |
| `pending`         | private   | `boolean`                                              | `false`                           | A submit handler is running; input and button are disabled until it settles.     |                |
| `error`           | private   | `string \| undefined`                                  |                                   | Message from the last rejected submission, shown inline until the input changes. |                |
| `inputRef`        | private   |                                                        |                                   |                                                                                  |                |
| `resolveFilename` | private   | `(filename: string \| undefined) => void \| undefined` |                                   |                                                                                  |                |
| `rejectFilename`  | private   | `(reason: unknown) => void \| undefined`               |                                   |                                                                                  |                |
| `submitHandler`   | private   | `FilenameSubmitHandler \| undefined`                   |                                   |                                                                                  |                |
| `initialFilename` | private   | `string`                                               | `"untitled"`                      |                                                                                  |                |

### Methods

| Name           | Privacy | Description                                                                                                                                                     | Parameters         | Return | Inherited From |
| -------------- | ------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------ | ------ | -------------- |
| `focusInput`   | private | Focus and select the basename, leaving the extension editable.&#xA;Dotfiles such as \`.env\` have no basename to select, so the whole name is selected instead. |                    |        |                |
| `close`        | private | Settle the pending prompt and hide the modal.                                                                                                                   | `filename: string` |        |                |
| `fail`         | private | Hide the modal and reject the pending prompt with the submit handler's error.                                                                                   | `reason: unknown`  |        |                |
| `handleSubmit` | private | Run the submit handler, keeping the prompt open with an inline error when the name is rejected.                                                                 | `e: SubmitEvent`   |        |                |

</details>

<hr/>

## Exports

| Kind                        | Name                | Declaration     | Module                              | Package |
| --------------------------- | ------------------- | --------------- | ----------------------------------- | ------- |
| `js`                        | `WyFilenameInput`   | WyFilenameInput | lib/components/wy-filename-input.ts |         |
| `custom-element-definition` | `wy-filename-input` | WyFilenameInput | lib/components/wy-filename-input.ts |         |
