tickera-angular-components 0.0.1-dev.152 → 0.0.1-dev.154

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -3585,6 +3585,7 @@ class TicketSelectionDiscountService {
3585
3585
  name: coupon.code,
3586
3586
  value: coupon.discount_value,
3587
3587
  type: SelectedDiscountCardType.COUPON,
3588
+ discountType: coupon.discount_type === CouponDiscountType.PERCENTAGE ? 'percentage' : 'fixed',
3588
3589
  };
3589
3590
  }
3590
3591
  const giftBond = this.giftBond();
@@ -3593,6 +3594,7 @@ class TicketSelectionDiscountService {
3593
3594
  name: 'Bono de regalo',
3594
3595
  value: giftBond.original_value,
3595
3596
  type: SelectedDiscountCardType.GIFT_BOND,
3597
+ discountType: 'fixed',
3596
3598
  };
3597
3599
  }
3598
3600
  const [corporateBond, corporateBondCode] = [this.corporateBond(), this.corporateBondCode()];
@@ -3601,6 +3603,7 @@ class TicketSelectionDiscountService {
3601
3603
  name: corporateBondCode,
3602
3604
  value: corporateBond.value,
3603
3605
  type: SelectedDiscountCardType.CORPORATE_BOND,
3606
+ discountType: 'fixed',
3604
3607
  };
3605
3608
  }
3606
3609
  return null;
@@ -3887,6 +3890,16 @@ class TicketSelectionTotalsService {
3887
3890
  serviceFee = computed(() => {
3888
3891
  return Number(this.bookingDataService.show()?.service_fee ?? '0');
3889
3892
  }, ...(ngDevMode ? [{ debugName: "serviceFee" }] : []));
3893
+ discountAmount = computed(() => {
3894
+ const discount = this.selectionDiscountService.selectedDiscount();
3895
+ if (!discount) {
3896
+ return null;
3897
+ }
3898
+ if (discount.discountType === 'percentage') {
3899
+ return (this.subtotalValue() * discount.value) / 100;
3900
+ }
3901
+ return discount.value;
3902
+ }, ...(ngDevMode ? [{ debugName: "discountAmount" }] : []));
3890
3903
  subtotalValue() {
3891
3904
  return (this.selectionService.selectedTickets().reduce((sum, ticket) => {
3892
3905
  return sum + Number(ticket?.normal_price || '0');
@@ -3907,12 +3920,12 @@ class TicketSelectionTotalsService {
3907
3920
  if (this.serviceFee() > 0) {
3908
3921
  total += this.serviceFee();
3909
3922
  }
3910
- const discountValue = this.selectionDiscountService.selectedDiscountValue();
3911
- if (!discountValue) {
3923
+ const amount = this.discountAmount();
3924
+ if (!amount) {
3912
3925
  return null;
3913
3926
  }
3914
- if (discountValue && discountValue > 0) {
3915
- total = total - discountValue;
3927
+ if (amount > 0) {
3928
+ total = total - amount;
3916
3929
  }
3917
3930
  if (total && total < 0) {
3918
3931
  total = 0;
@@ -5210,6 +5223,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.25", ngImpo
5210
5223
  class NumberInputComponent {
5211
5224
  transloco;
5212
5225
  injector;
5226
+ elementRef;
5213
5227
  label = '';
5214
5228
  name = '';
5215
5229
  id = '';
@@ -5225,9 +5239,10 @@ class NumberInputComponent {
5225
5239
  onChange = () => { };
5226
5240
  onTouched = () => { };
5227
5241
  _ngControl;
5228
- constructor(transloco, injector) {
5242
+ constructor(transloco, injector, elementRef) {
5229
5243
  this.transloco = transloco;
5230
5244
  this.injector = injector;
5245
+ this.elementRef = elementRef;
5231
5246
  }
5232
5247
  get ngControl() {
5233
5248
  if (this._ngControl === undefined) {
@@ -5277,6 +5292,7 @@ class NumberInputComponent {
5277
5292
  this.value = next;
5278
5293
  this.onChange(next);
5279
5294
  this.onTouched();
5295
+ this.emitNativeChange();
5280
5296
  }
5281
5297
  decrement() {
5282
5298
  if (!this.canDecrement)
@@ -5287,6 +5303,7 @@ class NumberInputComponent {
5287
5303
  this.value = next;
5288
5304
  this.onChange(next);
5289
5305
  this.onTouched();
5306
+ this.emitNativeChange();
5290
5307
  }
5291
5308
  get canIncrement() {
5292
5309
  if (this.disabled || this.readonly)
@@ -5344,6 +5361,12 @@ class NumberInputComponent {
5344
5361
  round(value) {
5345
5362
  return Math.round(value * 1e8) / 1e8;
5346
5363
  }
5364
+ emitNativeChange() {
5365
+ const inputEl = this.elementRef.nativeElement.querySelector('input');
5366
+ if (inputEl) {
5367
+ inputEl.dispatchEvent(new Event('change', { bubbles: true }));
5368
+ }
5369
+ }
5347
5370
  minValidator(control) {
5348
5371
  if (this.min === null)
5349
5372
  return null;
@@ -5366,7 +5389,7 @@ class NumberInputComponent {
5366
5389
  return null;
5367
5390
  return num > this.max ? { max: { max: this.max, actual: num } } : null;
5368
5391
  }
5369
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.25", ngImport: i0, type: NumberInputComponent, deps: [{ token: i2.TranslocoService }, { token: i0.Injector }], target: i0.ɵɵFactoryTarget.Component });
5392
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.25", ngImport: i0, type: NumberInputComponent, deps: [{ token: i2.TranslocoService }, { token: i0.Injector }, { token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Component });
5370
5393
  static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.25", type: NumberInputComponent, isStandalone: true, selector: "number-input", inputs: { label: "label", name: "name", id: "id", placeholder: "placeholder", required: "required", readonly: "readonly", min: "min", max: "max", step: "step", fieldGroupClass: "fieldGroupClass" }, providers: [
5371
5394
  {
5372
5395
  provide: NG_VALUE_ACCESSOR,
@@ -5386,7 +5409,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.25", ngImpo
5386
5409
  },
5387
5410
  { provide: NG_VALIDATORS, useExisting: forwardRef(() => NumberInputComponent), multi: true },
5388
5411
  ], template: "<div [class]=\"fieldGroupClasses\">\n @if (label) {\n <label [for]=\"inputId\" class=\"number-input-label\">\n {{ label }}\n\n @if (required) {\n <span class=\"number-input-required\">*</span>\n }\n </label>\n }\n\n <div class=\"number-input-group\" [class.error]=\"showError\">\n <button\n type=\"button\"\n class=\"number-input-button\"\n [attr.aria-label]=\"transloco.translate('numberInput.decrement')\"\n [disabled]=\"!canDecrement\"\n (click)=\"decrement()\"\n >\n <i class=\"ri-subtract-line\"></i>\n </button>\n\n <input\n type=\"number\"\n [id]=\"inputId\"\n [name]=\"name\"\n [placeholder]=\"placeholder\"\n [required]=\"required\"\n [min]=\"min\"\n [max]=\"max\"\n [step]=\"step\"\n [value]=\"value ?? ''\"\n (input)=\"onInput($event.target.value)\"\n (blur)=\"onTouched()\"\n [readonly]=\"readonly\"\n [disabled]=\"disabled\"\n [class.disabled]=\"readonly\"\n class=\"number-input\"\n />\n\n <button\n type=\"button\"\n class=\"number-input-button\"\n [attr.aria-label]=\"transloco.translate('numberInput.increment')\"\n [disabled]=\"!canIncrement\"\n (click)=\"increment()\"\n >\n <i class=\"ri-add-line\"></i>\n </button>\n </div>\n\n @if (showError) {\n <div class=\"number-input-error-message\">\n {{ errorMessage }}\n </div>\n }\n</div>\n", styles: [".number-input-label{color:#374151;display:block;font-size:.875rem;font-weight:600;margin-bottom:.25rem}@media(prefers-color-scheme:dark){.number-input-label{color:#d1d5db}}.number-input-group{display:flex;align-items:stretch}.number-input-group.error .number-input{outline-color:#ef4444}@media(prefers-color-scheme:dark){.number-input-group.error .number-input{background-color:#374151;color:#fff;outline-color:#ef4444}}.number-input-group.error .number-input-button{border-color:#ef4444}@media(prefers-color-scheme:dark){.number-input-group.error .number-input-button{background-color:#374151;color:#fff}}.number-input-button{align-items:center;background-color:#fff;border:1px solid #d1d5db;color:#4b5563;cursor:pointer;display:flex;justify-content:center;padding:0;width:2.5rem;transition:background-color .15s ease}.number-input-button:first-child{border-radius:.375rem 0 0 .375rem;margin-right:-1px}.number-input-button:last-child{border-radius:0 .375rem .375rem 0;margin-left:-1px}.number-input-button i{font-size:1.125rem;line-height:1}.number-input-button:hover:not(:disabled){background-color:#f3f4f6;color:#111827}.number-input-button:disabled{background-color:#e5e7eb;color:#9ca3af;cursor:not-allowed}@media(prefers-color-scheme:dark){.number-input-button{background-color:#1f2937;border-color:#4b5563;color:#d1d5db}.number-input-button:hover:not(:disabled){background-color:#374151;color:#fff}.number-input-button:disabled{background-color:#374151;color:#6b7280}}.number-input{background-color:#fff;border:1px solid #d1d5db;color:#111827;display:block;font-weight:500;outline:1px solid #d1d5db;outline-offset:-1px;padding:.375rem .75rem;text-align:center;width:100%}.number-input::placeholder{color:#9ca3af}.number-input:focus{outline:2px solid #4f46e5;outline-offset:-2px}.number-input.disabled{background-color:#e5e7eb;color:#6b7280;cursor:not-allowed}@media(prefers-color-scheme:dark){.number-input.disabled{background-color:#374151;color:#d1d5db}}.number-input::-webkit-inner-spin-button,.number-input::-webkit-outer-spin-button{-webkit-appearance:none;margin:0}.number-input[type=number]{-moz-appearance:textfield;appearance:textfield}@media(prefers-color-scheme:dark){.number-input{background-color:#1f2937;border-color:#4b5563;color:#f3f4f6}.number-input::placeholder{color:#6b7280}}@media(min-width:768px){.number-input{font-size:.875rem}}.number-input-required{color:#ef4444}.number-input-error-message{color:#ef4444;font-size:.75rem;margin-top:.25rem}\n"] }]
5389
- }], ctorParameters: () => [{ type: i2.TranslocoService }, { type: i0.Injector }], propDecorators: { label: [{
5412
+ }], ctorParameters: () => [{ type: i2.TranslocoService }, { type: i0.Injector }, { type: i0.ElementRef }], propDecorators: { label: [{
5390
5413
  type: Input
5391
5414
  }], name: [{
5392
5415
  type: Input
@@ -8923,7 +8946,7 @@ class TicketMapTotalsComponent {
8923
8946
  return this.selectionService.selectedTicketIdList();
8924
8947
  }
8925
8948
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.25", ngImport: i0, type: TicketMapTotalsComponent, deps: [{ token: PerformanceBookingDataService }, { token: TicketSelectionDetailsService }, { token: TicketSelectionDiscountService }, { token: TicketSelectionTotalsService }, { token: TicketSelectionService }, { token: i3$1.ActivatedRoute }], target: i0.ɵɵFactoryTarget.Component });
8926
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.25", type: TicketMapTotalsComponent, isStandalone: true, selector: "ticket-map-totals", inputs: { title: "title", buttonText: "buttonText", loadingButtonText: "loadingButtonText", isLoading: "isLoading" }, outputs: { onPurchaseClick: "onPurchaseClick" }, ngImport: i0, template: "<ticket-map-widget class=\"w-full\">\n <ticket-map-widget-header [title]=\"title\" />\n\n <div class=\"ticket-map-totals\">\n <p class=\"ticket-map-totals__item\">\n <span>Entradas ({{ selectionService.selectedCount() | number: '1.0-2' }}):</span>\n <span> ${{ selectionTotalsService.ticketSubtotal() | number: '1.0-2' }} </span>\n </p>\n\n @if (selectionService.selectedProductCount() > 0) {\n <p class=\"ticket-map-totals__item\">\n <span>Productos ({{ selectionService.selectedProductCount() | number: '1.0-2' }}):</span>\n <span>${{ selectionTotalsService.productSubtotal() | number: '1.0-2' }}</span>\n </p>\n }\n\n @if (serviceFee > 0) {\n <p class=\"ticket-map-totals__item\">\n <span>Tarifa de servicio:</span>\n <span>${{ bookingDataService.show()?.service_fee ?? '0' | number: '1.0-2' }}</span>\n </p>\n }\n\n @if (!!selectionDiscountService.coupon()) {\n <p class=\"ticket-map-totals__item\">\n <span>Cup\u00F3n de descuento:</span>\n <span class=\"line-through\">\n ${{ selectionDiscountService.coupon()?.discount_value ?? '0' | number: '1.0-2' }}\n </span>\n </p>\n }\n\n @if (!!selectionDiscountService.corporateBond()) {\n <p class=\"ticket-map-totals__item\">\n <span>Bono corporativo:</span>\n <span class=\"line-through\">\n ${{ selectionDiscountService.corporateBond()?.value ?? '0' | number: '1.0-2' }}\n </span>\n </p>\n }\n\n @if (!!selectionDiscountService.giftBond()) {\n <p class=\"ticket-map-totals__item\">\n <span>Bono de regalo:</span>\n <span class=\"line-through\">\n ${{ selectionDiscountService.giftBond()?.original_value ?? '0' | number: '1.0-2' }}\n </span>\n </p>\n }\n\n <hr class=\"ticket-map-totals__divider\" />\n\n <div class=\"ticket-map-totals__calculated\">\n <span class=\"ticket-map-totals__calculated-title\">Total:</span>\n\n @if (\n selectionTotalsService.totalDiscounted() || selectionTotalsService.totalDiscounted() === 0\n ) {\n <span class=\"ticket-map-totals__calculated-inline\">\n <span class=\"ticket-map-totals__calculated-discount\">\n ${{ selectionTotalsService.totalValue() | currency: 'COP' : 'symbol' : '1.0-2' }}\n </span>\n <span class=\"ticket-map-totals__calculated-total\">\n ${{ selectionTotalsService.totalDiscounted() | currency: 'COP' : 'symbol' : '1.0-2' }}\n </span>\n </span>\n } @else {\n <span class=\"ticket-map-totals__calculated-total\">\n ${{ selectionTotalsService.totalValue() | number: '1.0-2' }}\n </span>\n }\n </div>\n\n @if (selectionService.selectedCount() > 0 || selectionService.selectedProductCount() > 0) {\n <div class=\"flex flex-col gap-2\">\n <app-button\n (click)=\"onPurchaseClick.emit()\"\n size=\"sm\"\n icon=\"ri-dashboard-3-line\"\n [text]=\"buttonText\"\n [loadingText]=\"loadingButtonText\"\n [loading]=\"isLoading\"\n variant=\"primary\"\n />\n </div>\n }\n </div>\n</ticket-map-widget>\n", styles: [".ticket-map-totals{display:flex;flex-direction:column;gap:.5rem;margin-top:.5rem;width:100%}.ticket-map-totals__item{align-items:center;color:#9ca3af;display:flex;flex-direction:row;font-size:.75rem;justify-content:space-between;margin:0}.ticket-map-totals__divider{border:none;border-top:1px solid #e5e7eb;width:100%}.ticket-map-totals__calculated{display:flex;flex-direction:row;align-items:center;justify-content:space-between;margin:0}.ticket-map-totals__calculated-title{color:#4b5563;font-size:1rem;font-weight:700}.ticket-map-totals__calculated-inline{display:flex;flex-direction:column;align-items:flex-end}.ticket-map-totals__calculated-discount{color:#9ca3af;font-size:.75rem;text-decoration:line-through}.ticket-map-totals__calculated-total{color:#4b5563;font-size:1rem;font-weight:700}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "component", type: AppButtonComponent, selector: "app-button", inputs: ["disabled", "loading", "type", "variant", "text", "size", "loadingText", "icon", "tooltip"], outputs: ["clicked"] }, { kind: "component", type: TicketMapWidgetHeaderComponent, selector: "ticket-map-widget-header", inputs: ["title"] }, { kind: "component", type: TicketMapWidgetComponent, selector: "ticket-map-widget" }, { kind: "pipe", type: i1$1.DecimalPipe, name: "number" }, { kind: "pipe", type: i1$1.CurrencyPipe, name: "currency" }] });
8949
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.25", type: TicketMapTotalsComponent, isStandalone: true, selector: "ticket-map-totals", inputs: { title: "title", buttonText: "buttonText", loadingButtonText: "loadingButtonText", isLoading: "isLoading" }, outputs: { onPurchaseClick: "onPurchaseClick" }, ngImport: i0, template: "<ticket-map-widget class=\"w-full\">\n <ticket-map-widget-header [title]=\"title\" />\n\n <div class=\"ticket-map-totals\">\n <p class=\"ticket-map-totals__item\">\n <span>Entradas ({{ selectionService.selectedCount() | number: '1.0-2' }}):</span>\n <span> ${{ selectionTotalsService.ticketSubtotal() | number: '1.0-2' }} </span>\n </p>\n\n @if (selectionService.selectedProductCount() > 0) {\n <p class=\"ticket-map-totals__item\">\n <span>Productos ({{ selectionService.selectedProductCount() | number: '1.0-2' }}):</span>\n <span>${{ selectionTotalsService.productSubtotal() | number: '1.0-2' }}</span>\n </p>\n }\n\n @if (serviceFee > 0) {\n <p class=\"ticket-map-totals__item\">\n <span>Tarifa de servicio:</span>\n <span>${{ bookingDataService.show()?.service_fee ?? '0' | number: '1.0-2' }}</span>\n </p>\n }\n\n @if (!!selectionDiscountService.coupon() && selectionTotalsService.discountAmount()) {\n <p class=\"ticket-map-totals__item\">\n <span>Cup\u00F3n de descuento:</span>\n <span class=\"line-through\">\n -${{ selectionTotalsService.discountAmount() | number: '1.0-2' }}\n @if (selectionDiscountService.selectedDiscount()?.discountType === 'percentage') {\n ({{ selectionDiscountService.coupon()?.discount_value }}%)\n }\n </span>\n </p>\n }\n\n @if (!!selectionDiscountService.corporateBond()) {\n <p class=\"ticket-map-totals__item\">\n <span>Bono corporativo:</span>\n <span class=\"line-through\">\n ${{ selectionDiscountService.corporateBond()?.value ?? '0' | number: '1.0-2' }}\n </span>\n </p>\n }\n\n @if (!!selectionDiscountService.giftBond()) {\n <p class=\"ticket-map-totals__item\">\n <span>Bono de regalo:</span>\n <span class=\"line-through\">\n ${{ selectionDiscountService.giftBond()?.original_value ?? '0' | number: '1.0-2' }}\n </span>\n </p>\n }\n\n <hr class=\"ticket-map-totals__divider\" />\n\n <div class=\"ticket-map-totals__calculated\">\n <span class=\"ticket-map-totals__calculated-title\">Total:</span>\n\n @if (\n selectionTotalsService.totalDiscounted() || selectionTotalsService.totalDiscounted() === 0\n ) {\n <span class=\"ticket-map-totals__calculated-inline\">\n <span class=\"ticket-map-totals__calculated-discount\">\n ${{ selectionTotalsService.totalValue() | currency: 'COP' : 'symbol' : '1.0-2' }}\n </span>\n <span class=\"ticket-map-totals__calculated-total\">\n ${{ selectionTotalsService.totalDiscounted() | currency: 'COP' : 'symbol' : '1.0-2' }}\n </span>\n </span>\n } @else {\n <span class=\"ticket-map-totals__calculated-total\">\n ${{ selectionTotalsService.totalValue() | number: '1.0-2' }}\n </span>\n }\n </div>\n\n @if (selectionService.selectedCount() > 0 || selectionService.selectedProductCount() > 0) {\n <div class=\"flex flex-col gap-2\">\n <app-button\n (click)=\"onPurchaseClick.emit()\"\n size=\"sm\"\n icon=\"ri-dashboard-3-line\"\n [text]=\"buttonText\"\n [loadingText]=\"loadingButtonText\"\n [loading]=\"isLoading\"\n variant=\"primary\"\n />\n </div>\n }\n </div>\n</ticket-map-widget>\n", styles: [".ticket-map-totals{display:flex;flex-direction:column;gap:.5rem;margin-top:.5rem;width:100%}.ticket-map-totals__item{align-items:center;color:#9ca3af;display:flex;flex-direction:row;font-size:.75rem;justify-content:space-between;margin:0}.ticket-map-totals__divider{border:none;border-top:1px solid #e5e7eb;width:100%}.ticket-map-totals__calculated{display:flex;flex-direction:row;align-items:center;justify-content:space-between;margin:0}.ticket-map-totals__calculated-title{color:#4b5563;font-size:1rem;font-weight:700}.ticket-map-totals__calculated-inline{display:flex;flex-direction:column;align-items:flex-end}.ticket-map-totals__calculated-discount{color:#9ca3af;font-size:.75rem;text-decoration:line-through}.ticket-map-totals__calculated-total{color:#4b5563;font-size:1rem;font-weight:700}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "component", type: AppButtonComponent, selector: "app-button", inputs: ["disabled", "loading", "type", "variant", "text", "size", "loadingText", "icon", "tooltip"], outputs: ["clicked"] }, { kind: "component", type: TicketMapWidgetHeaderComponent, selector: "ticket-map-widget-header", inputs: ["title"] }, { kind: "component", type: TicketMapWidgetComponent, selector: "ticket-map-widget" }, { kind: "pipe", type: i1$1.DecimalPipe, name: "number" }, { kind: "pipe", type: i1$1.CurrencyPipe, name: "currency" }] });
8927
8950
  }
8928
8951
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.25", ngImport: i0, type: TicketMapTotalsComponent, decorators: [{
8929
8952
  type: Component,
@@ -8932,7 +8955,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.25", ngImpo
8932
8955
  AppButtonComponent,
8933
8956
  TicketMapWidgetHeaderComponent,
8934
8957
  TicketMapWidgetComponent,
8935
- ], template: "<ticket-map-widget class=\"w-full\">\n <ticket-map-widget-header [title]=\"title\" />\n\n <div class=\"ticket-map-totals\">\n <p class=\"ticket-map-totals__item\">\n <span>Entradas ({{ selectionService.selectedCount() | number: '1.0-2' }}):</span>\n <span> ${{ selectionTotalsService.ticketSubtotal() | number: '1.0-2' }} </span>\n </p>\n\n @if (selectionService.selectedProductCount() > 0) {\n <p class=\"ticket-map-totals__item\">\n <span>Productos ({{ selectionService.selectedProductCount() | number: '1.0-2' }}):</span>\n <span>${{ selectionTotalsService.productSubtotal() | number: '1.0-2' }}</span>\n </p>\n }\n\n @if (serviceFee > 0) {\n <p class=\"ticket-map-totals__item\">\n <span>Tarifa de servicio:</span>\n <span>${{ bookingDataService.show()?.service_fee ?? '0' | number: '1.0-2' }}</span>\n </p>\n }\n\n @if (!!selectionDiscountService.coupon()) {\n <p class=\"ticket-map-totals__item\">\n <span>Cup\u00F3n de descuento:</span>\n <span class=\"line-through\">\n ${{ selectionDiscountService.coupon()?.discount_value ?? '0' | number: '1.0-2' }}\n </span>\n </p>\n }\n\n @if (!!selectionDiscountService.corporateBond()) {\n <p class=\"ticket-map-totals__item\">\n <span>Bono corporativo:</span>\n <span class=\"line-through\">\n ${{ selectionDiscountService.corporateBond()?.value ?? '0' | number: '1.0-2' }}\n </span>\n </p>\n }\n\n @if (!!selectionDiscountService.giftBond()) {\n <p class=\"ticket-map-totals__item\">\n <span>Bono de regalo:</span>\n <span class=\"line-through\">\n ${{ selectionDiscountService.giftBond()?.original_value ?? '0' | number: '1.0-2' }}\n </span>\n </p>\n }\n\n <hr class=\"ticket-map-totals__divider\" />\n\n <div class=\"ticket-map-totals__calculated\">\n <span class=\"ticket-map-totals__calculated-title\">Total:</span>\n\n @if (\n selectionTotalsService.totalDiscounted() || selectionTotalsService.totalDiscounted() === 0\n ) {\n <span class=\"ticket-map-totals__calculated-inline\">\n <span class=\"ticket-map-totals__calculated-discount\">\n ${{ selectionTotalsService.totalValue() | currency: 'COP' : 'symbol' : '1.0-2' }}\n </span>\n <span class=\"ticket-map-totals__calculated-total\">\n ${{ selectionTotalsService.totalDiscounted() | currency: 'COP' : 'symbol' : '1.0-2' }}\n </span>\n </span>\n } @else {\n <span class=\"ticket-map-totals__calculated-total\">\n ${{ selectionTotalsService.totalValue() | number: '1.0-2' }}\n </span>\n }\n </div>\n\n @if (selectionService.selectedCount() > 0 || selectionService.selectedProductCount() > 0) {\n <div class=\"flex flex-col gap-2\">\n <app-button\n (click)=\"onPurchaseClick.emit()\"\n size=\"sm\"\n icon=\"ri-dashboard-3-line\"\n [text]=\"buttonText\"\n [loadingText]=\"loadingButtonText\"\n [loading]=\"isLoading\"\n variant=\"primary\"\n />\n </div>\n }\n </div>\n</ticket-map-widget>\n", styles: [".ticket-map-totals{display:flex;flex-direction:column;gap:.5rem;margin-top:.5rem;width:100%}.ticket-map-totals__item{align-items:center;color:#9ca3af;display:flex;flex-direction:row;font-size:.75rem;justify-content:space-between;margin:0}.ticket-map-totals__divider{border:none;border-top:1px solid #e5e7eb;width:100%}.ticket-map-totals__calculated{display:flex;flex-direction:row;align-items:center;justify-content:space-between;margin:0}.ticket-map-totals__calculated-title{color:#4b5563;font-size:1rem;font-weight:700}.ticket-map-totals__calculated-inline{display:flex;flex-direction:column;align-items:flex-end}.ticket-map-totals__calculated-discount{color:#9ca3af;font-size:.75rem;text-decoration:line-through}.ticket-map-totals__calculated-total{color:#4b5563;font-size:1rem;font-weight:700}\n"] }]
8958
+ ], template: "<ticket-map-widget class=\"w-full\">\n <ticket-map-widget-header [title]=\"title\" />\n\n <div class=\"ticket-map-totals\">\n <p class=\"ticket-map-totals__item\">\n <span>Entradas ({{ selectionService.selectedCount() | number: '1.0-2' }}):</span>\n <span> ${{ selectionTotalsService.ticketSubtotal() | number: '1.0-2' }} </span>\n </p>\n\n @if (selectionService.selectedProductCount() > 0) {\n <p class=\"ticket-map-totals__item\">\n <span>Productos ({{ selectionService.selectedProductCount() | number: '1.0-2' }}):</span>\n <span>${{ selectionTotalsService.productSubtotal() | number: '1.0-2' }}</span>\n </p>\n }\n\n @if (serviceFee > 0) {\n <p class=\"ticket-map-totals__item\">\n <span>Tarifa de servicio:</span>\n <span>${{ bookingDataService.show()?.service_fee ?? '0' | number: '1.0-2' }}</span>\n </p>\n }\n\n @if (!!selectionDiscountService.coupon() && selectionTotalsService.discountAmount()) {\n <p class=\"ticket-map-totals__item\">\n <span>Cup\u00F3n de descuento:</span>\n <span class=\"line-through\">\n -${{ selectionTotalsService.discountAmount() | number: '1.0-2' }}\n @if (selectionDiscountService.selectedDiscount()?.discountType === 'percentage') {\n ({{ selectionDiscountService.coupon()?.discount_value }}%)\n }\n </span>\n </p>\n }\n\n @if (!!selectionDiscountService.corporateBond()) {\n <p class=\"ticket-map-totals__item\">\n <span>Bono corporativo:</span>\n <span class=\"line-through\">\n ${{ selectionDiscountService.corporateBond()?.value ?? '0' | number: '1.0-2' }}\n </span>\n </p>\n }\n\n @if (!!selectionDiscountService.giftBond()) {\n <p class=\"ticket-map-totals__item\">\n <span>Bono de regalo:</span>\n <span class=\"line-through\">\n ${{ selectionDiscountService.giftBond()?.original_value ?? '0' | number: '1.0-2' }}\n </span>\n </p>\n }\n\n <hr class=\"ticket-map-totals__divider\" />\n\n <div class=\"ticket-map-totals__calculated\">\n <span class=\"ticket-map-totals__calculated-title\">Total:</span>\n\n @if (\n selectionTotalsService.totalDiscounted() || selectionTotalsService.totalDiscounted() === 0\n ) {\n <span class=\"ticket-map-totals__calculated-inline\">\n <span class=\"ticket-map-totals__calculated-discount\">\n ${{ selectionTotalsService.totalValue() | currency: 'COP' : 'symbol' : '1.0-2' }}\n </span>\n <span class=\"ticket-map-totals__calculated-total\">\n ${{ selectionTotalsService.totalDiscounted() | currency: 'COP' : 'symbol' : '1.0-2' }}\n </span>\n </span>\n } @else {\n <span class=\"ticket-map-totals__calculated-total\">\n ${{ selectionTotalsService.totalValue() | number: '1.0-2' }}\n </span>\n }\n </div>\n\n @if (selectionService.selectedCount() > 0 || selectionService.selectedProductCount() > 0) {\n <div class=\"flex flex-col gap-2\">\n <app-button\n (click)=\"onPurchaseClick.emit()\"\n size=\"sm\"\n icon=\"ri-dashboard-3-line\"\n [text]=\"buttonText\"\n [loadingText]=\"loadingButtonText\"\n [loading]=\"isLoading\"\n variant=\"primary\"\n />\n </div>\n }\n </div>\n</ticket-map-widget>\n", styles: [".ticket-map-totals{display:flex;flex-direction:column;gap:.5rem;margin-top:.5rem;width:100%}.ticket-map-totals__item{align-items:center;color:#9ca3af;display:flex;flex-direction:row;font-size:.75rem;justify-content:space-between;margin:0}.ticket-map-totals__divider{border:none;border-top:1px solid #e5e7eb;width:100%}.ticket-map-totals__calculated{display:flex;flex-direction:row;align-items:center;justify-content:space-between;margin:0}.ticket-map-totals__calculated-title{color:#4b5563;font-size:1rem;font-weight:700}.ticket-map-totals__calculated-inline{display:flex;flex-direction:column;align-items:flex-end}.ticket-map-totals__calculated-discount{color:#9ca3af;font-size:.75rem;text-decoration:line-through}.ticket-map-totals__calculated-total{color:#4b5563;font-size:1rem;font-weight:700}\n"] }]
8936
8959
  }], ctorParameters: () => [{ type: PerformanceBookingDataService }, { type: TicketSelectionDetailsService }, { type: TicketSelectionDiscountService }, { type: TicketSelectionTotalsService }, { type: TicketSelectionService }, { type: i3$1.ActivatedRoute }], propDecorators: { title: [{
8937
8960
  type: Input
8938
8961
  }], buttonText: [{