import { CSSResultGroup } from 'lit'; import { default as PairboElement } from '../../internal/pairbo-element.js'; import { default as PboTextarea } from '../textarea/textarea.component.js'; /** * A component that handles gift options for orders, including gift status, premium cards, and free messages. * @summary Manages various gift options like premium cards and custom messages for orders. * @status experimental * * @dependency pbo-textarea * * @event pbo-open-drawer - Emitted when premium card option is selected. * @event pbo-close-drawer - Emitted when premium card option is deselected. * * @slot is-gift-label - Label content for the "is gift" checkbox. * @slot is-gift-icon - Icon content for the "is gift" option. * @slot premium-card-label - Label content for the premium card checkbox. * @slot premium-card-description - Description content for the premium card option. * @slot free-message-label - Label content for the free message checkbox. * * @csspart base - The component's base wrapper. * @csspart is-gift - The "is gift" option container. * @csspart checkbox - The checkbox input elements. * @csspart is-gift-label - The "is gift" label container. * @csspart is-gift-icon - The "is gift" icon container. * @csspart divider - The horizontal divider line. * @csspart premium-card - The premium card option container. * @csspart premium-card-label - The premium card label container. * @csspart premium-card-description - The premium card description container. * @csspart free-message - The free message option container. * @csspart free-message-label - The free message label container. * @csspart free-message-textarea - The free message textarea element. * * * @cssproperty [--container-padding=var(--pbo-spacing-medium) 0px var(--pbo-spacing-medium) 0px] - The amount of padding to use for the container. * @cssproperty [--container-gap=var(--pbo-spacing-medium)] - The amount of gap to use between elements. * @cssproperty [--container-margin=var(--pbo-spacing-small)] - The amount of margin to use for the container. * @cssproperty [--label-gap=6.4px] - The amount of gap to use between label elements. * @cssproperty [--label-font-size=15.2px] - The font size to use for label elements. * @cssproperty [--description-font-size=13px] - The font size to use for description elements. * * @property {string} freeMessage - The content of the free message textarea. * @property {Function} onPremiumSelected - Callback function when premium card is selected/deselected. * @property {Function} onFreeMessageChange - Callback function when free message content changes. * @property {Function} onFreeMessageClear - Callback function when free message is cleared. * @property {boolean} hidden - Whether the component is hidden. * @property {boolean} expand - Whether the component is expanded. */ export default class PboGiftOptions extends PairboElement { static styles: CSSResultGroup; static dependencies: { "pbo-textarea": typeof PboTextarea; }; private readonly hasSlotController; /** Free message textarea value */ onPremiumSelected?: (selected: boolean) => void; onFreeMessageChange?: (text: string) => void; onFreeMessageClear?: () => void; hidden: boolean; expand: boolean; dividerConfig: { topDivider: { visible: boolean; persistent: boolean; }; bottomDivider: { visible: boolean; persistent: boolean; }; }; freeMessage: string; isGift: boolean; isPremiumChecked: boolean; isFreeMessageChecked: boolean; debouncedFreeMessageChange: (text: string) => void; handleOnFreeMessageChange(): void; handleIsGiftChange(): void; handleIsFreeMessageCheckedChange(): void; handleIsPremiumCheckedChange(): void; handleFreeMessageChange(): void; firstUpdated(): void; setGiftOptionEnabled(isGift: boolean): void; setPremiumEnabled(isPremiumActive: boolean): void; setFreeMessageEnabled(useFreeMessage: boolean): void; render(): import('lit-html').TemplateResult<1>; clear(): void; }