{"version":3,"file":"fundamental-ngx-btp-button.mjs","sources":["../../../../libs/btp/button/button-type-guard.ts","../../../../libs/btp/button/nested-button.directive.ts","../../../../libs/btp/button/tool-header-button.directive.ts","../../../../libs/btp/button/fundamental-ngx-btp-button.ts"],"sourcesContent":["import { Directive, effect, inject, Signal } from '@angular/core';\nimport { ButtonComponent, ButtonType, FD_BUTTON_COMPONENT } from '@fundamental-ngx/core/button';\n\n@Directive()\nexport abstract class ButtonTypeGuard {\n    /** Type of the button. */\n    abstract readonly fdType: Signal<ButtonType | undefined>;\n\n    /** @hidden */\n    protected readonly buttonComponent = inject<ButtonComponent>(FD_BUTTON_COMPONENT, { host: true });\n\n    /** @hidden */\n    constructor() {\n        // Automatically update button type when fdType signal changes\n        effect(() => {\n            const type = this.fdType();\n            if (type) {\n                this.buttonComponent.setFdType(type);\n            }\n        });\n    }\n}\n","import { BooleanInput } from '@angular/cdk/coercion';\nimport { Directive, booleanAttribute, computed, input } from '@angular/core';\nimport { ButtonType } from '@fundamental-ngx/core/button';\nimport { ButtonTypeGuard } from './button-type-guard';\n\n@Directive({\n    selector: '[fd-button][fdbNestedButton]'\n})\nexport class NestedButtonDirective extends ButtonTypeGuard {\n    /** Whether the button should have squared form */\n    readonly square = input<boolean, BooleanInput>(false, { transform: booleanAttribute });\n\n    /** Type of the button. In case of fdbNestedButton it is always `nested` or `nested-square` based on square input */\n    readonly fdType = computed(() => (this.square() ? 'nested-square' : 'nested') as ButtonType);\n}\n","import { Directive, input } from '@angular/core';\nimport { ButtonType } from '@fundamental-ngx/core/button';\nimport { ButtonTypeGuard } from './button-type-guard';\n\n@Directive({\n    selector: '[fd-button][fdbToolHeaderButton]'\n})\nexport class ToolHeaderButtonDirective extends ButtonTypeGuard {\n    /** Type of the button. In case of fdbToolHeaderButton it is always a `tool-header` */\n    readonly fdType = input('tool-header' as ButtonType);\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;MAIsB,eAAe,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