{"version":3,"file":"ngwr-empty.mjs","sources":["../../../projects/lib/empty/empty.ts","../../../projects/lib/empty/empty.html","../../../projects/lib/empty/ngwr-empty.ts"],"sourcesContent":["/**\n * @license\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://github.com/thekhegay/ngwr/blob/main/LICENSE\n */\n\nimport { Component, ViewEncapsulation, input } from '@angular/core';\n\nimport { useI18nText } from 'ngwr/i18n';\nimport { type WrIconName } from 'ngwr/icon';\n\n/**\n * Empty-state placeholder. Drop into any container where the underlying\n * data is missing (search yielded nothing, table is empty, etc.).\n *\n * Slots:\n *\n * - **Default** — primary description / instructions.\n * - **`[wrEmptyActions]`** — action row rendered below the description.\n *\n * Localization: the default headline reads from the `empty.noData` key in\n * the registered `WrI18n` catalog, falling back to `'No data'` when no\n * `WrI18n` is provided. The `[title]` input always wins when set.\n *\n * @example\n * ```html\n * <wr-empty icon=\"search\" title=\"No results\">\n *   Try a different query or clear filters.\n *   <ng-container wrEmptyActions>\n *     <wr-btn (click)=\"reset()\">Reset filters</wr-btn>\n *   </ng-container>\n * </wr-empty>\n * ```\n *\n * @see https://ngwr.dev/components/empty\n */\n@Component({\n  selector: 'wr-empty',\n  templateUrl: './empty.html',\n  encapsulation: ViewEncapsulation.None,\n  host: { class: 'wr-empty', role: 'status' },\n})\nexport class WrEmpty {\n  /** Icon name shown above the title. @default 'folder' */\n  readonly icon = input<WrIconName | null>('folder');\n\n  /** Headline. Falls back to `empty.noData` from WrI18n, then `'No data'`. */\n  readonly title = input<string | null>(null);\n\n  protected readonly resolvedTitle = useI18nText(this.title, 'empty.noData', 'No data');\n}\n","@if (icon()) {\n  <svg\n    class=\"wr-icon__svg wr-empty__icon\"\n    xmlns=\"http://www.w3.org/2000/svg\"\n    viewBox=\"0 0 24 24\"\n    fill=\"none\"\n    stroke=\"currentColor\"\n    stroke-width=\"2\"\n    stroke-linecap=\"round\"\n    stroke-linejoin=\"round\"\n    aria-hidden=\"true\"\n  >\n    <path\n      d=\"M20 20a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.9a2 2 0 0 1-1.69-.9L9.6 3.9A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13a2 2 0 0 0 2 2Z\"\n    />\n  </svg>\n}\n<div class=\"wr-empty__title\">{{ resolvedTitle() }}</div>\n<div class=\"wr-empty__description\">\n  <ng-content />\n</div>\n<div class=\"wr-empty__actions\">\n  <ng-content select=\"[wrEmptyActions]\" />\n</div>\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;AAAA;;;;;AAKG;AAOH;;;;;;;;;;;;;;;;;;;;;;;;AAwBG;MAOU,OAAO,CAAA;;IAET,IAAI,GAAG,KAAK,CAAoB,QAAQ;6EAAC;;IAGzC,KAAK,GAAG,KAAK,CAAgB,IAAI;8EAAC;IAExB,aAAa,GAAG,WAAW,CAAC,IAAI,CAAC,KAAK,EAAE,cAAc,EAAE,SAAS,CAAC;uGAP1E,OAAO,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA;AAAP,IAAA,OAAA,IAAA,GAAA,EAAA,CAAA,oBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,IAAA,EAAA,OAAO,qYC3CpB,wqBAwBA,EAAA,aAAA,EAAA,EAAA,CAAA,iBAAA,CAAA,IAAA,EAAA,CAAA;;2FDmBa,OAAO,EAAA,UAAA,EAAA,CAAA;kBANnB,SAAS;AACE,YAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,UAAU,EAAA,aAAA,EAEL,iBAAiB,CAAC,IAAI,EAAA,IAAA,EAC/B,EAAE,KAAK,EAAE,UAAU,EAAE,IAAI,EAAE,QAAQ,EAAE,EAAA,QAAA,EAAA,wqBAAA,EAAA;;;AEzC7C;;AAEG;;;;"}