tickera-angular-components 0.0.1-dev.98 → 0.0.1-dev.99

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.
@@ -8323,19 +8323,65 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.25", ngImpo
8323
8323
 
8324
8324
  class OrderInformationComponent {
8325
8325
  transloco;
8326
+ toastService;
8326
8327
  order;
8327
- constructor(transloco) {
8328
+ showPayButton = true;
8329
+ createMpPreference;
8330
+ paymentLinkCreated = new EventEmitter();
8331
+ isLoading = false;
8332
+ constructor(transloco, toastService) {
8328
8333
  this.transloco = transloco;
8334
+ this.toastService = toastService;
8335
+ }
8336
+ get showMpButton() {
8337
+ if (!this.showPayButton || !this.createMpPreference) {
8338
+ return false;
8339
+ }
8340
+ return (this.order.payment_method === PaymentMethod.MERCADO_PAGO &&
8341
+ (this.order.status === OrderStatus.PENDING_PAYMENT ||
8342
+ this.order.status === OrderStatus.ON_HOLD));
8329
8343
  }
8330
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.25", ngImport: i0, type: OrderInformationComponent, deps: [{ token: i2.TranslocoService }], target: i0.ɵɵFactoryTarget.Component });
8331
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.25", type: OrderInformationComponent, isStandalone: true, selector: "order-information", inputs: { order: "order" }, ngImport: i0, template: "@if (!!order) {\n <div class=\"order-information\">\n <div class=\"order-information__header\">\n <div>\n <p class=\"order-information__header-id\">Orden #{{ order.id }}</p>\n <p class=\"order-information__header-uuid\">{{ order.uuid }}</p>\n </div>\n\n <order-status-badge [order]=\"order\" />\n </div>\n\n <div class=\"order-information__content\">\n @if (order.show_snapshot && order.show_snapshot['title']) {\n <div class=\"order-information__content-item\">\n <p class=\"order-information__content-item-title\">Evento</p>\n <p class=\"order-information__content-item-value\">\n {{ order.show_snapshot['title'] }}\n </p>\n </div>\n }\n\n @if (order.performance_snapshot && order.performance_snapshot['start_time']) {\n <div class=\"order-information__content-item\">\n <p class=\"order-information__content-item-title\">Fecha de la funci\u00F3n</p>\n <p class=\"order-information__content-item-value\">\n {{ order.performance_snapshot['start_time'] | date: 'dd/MM/yyyy hh:mm a' }}\n </p>\n </div>\n }\n\n <div class=\"order-information__content-item\">\n <p class=\"order-information__content-item-title\">Fecha de la compra</p>\n <p class=\"order-information__content-item-value\">\n {{ order.created_at | date: 'dd/MM/yyyy hh:mm a' }}\n </p>\n </div>\n\n @if (order.payment_method) {\n <div class=\"order-information__content-item\">\n <p class=\"order-information__content-item-title\">M\u00E9todo de pago</p>\n <p class=\"order-information__content-item-value\">\n {{ `order.paymentMethods.${order.payment_method}` | transloco }}\n </p>\n </div>\n }\n\n @if (order.service_fee && order.service_fee > 0) {\n <div class=\"order-information__content-item\">\n <p class=\"order-information__content-item-title\">Tarifa de servicio</p>\n <p class=\"order-information__content-item-value\">\n ${{ order.service_fee | currency: 'COP' : '' : '1.0-2' }}\n </p>\n </div>\n }\n\n @if (!!order.discount_amount && order.discount_amount > 0) {\n <div class=\"order-information__content-item\">\n <p class=\"order-information__content-item-title\">Descuento</p>\n <p class=\"order-information__content-item-value\">\n ${{ order.discount_amount | currency: 'COP' : '' : '1.0-2' }}\n </p>\n </div>\n }\n\n <div class=\"order-information__content-item\">\n <p class=\"order-information__content-item-title\">Total</p>\n @if (order.total_discounted && order.total_discounted >= 0) {\n <p class=\"order-information__content-item-total_discounted\">\n <span class=\"discounted\">\n ${{ order.total_discounted | currency: 'COP' : '' : '1.0-2' }}\n </span>\n <span class=\"order-information__content-item-value total\">\n ${{ order.total | currency: 'COP' : '' : '1.0-2' }}\n </span>\n </p>\n } @else {\n <p class=\"order-information__content-item-value total\">\n ${{ order.total | currency: 'COP' : '' : '1.0-2' }}\n </p>\n }\n </div>\n\n <div class=\"order-information__content-item\">\n <p class=\"order-information__content-item-title\">T\u00E9rminos aceptados</p>\n <app-badge\n [text]=\"order.terms_accepted ? 'Aceptado' : 'No aceptado'\"\n [backgroundColor]=\"order.terms_accepted ? '#dcfce7' : '#fee2e2'\"\n [textColor]=\"order.terms_accepted ? '#16a34a' : '#dc2626'\"\n size=\"xs\"\n />\n </div>\n\n <div class=\"order-information__content-item\">\n <p class=\"order-information__content-item-title\">Procesamiento de datos aceptado</p>\n <app-badge\n [text]=\"order.data_processing_accepted ? 'Aceptado' : 'No aceptado'\"\n [backgroundColor]=\"order.data_processing_accepted ? '#dcfce7' : '#fee2e2'\"\n [textColor]=\"order.data_processing_accepted ? '#16a34a' : '#dc2626'\"\n size=\"xs\"\n />\n </div>\n\n @if (order.comments) {\n <div class=\"order-information__content-item\">\n <p class=\"order-information__content-item-title\">Comentarios</p>\n <p class=\"order-information__content-item-value\">{{ order.comments }}</p>\n </div>\n }\n\n @if (order.address_notes) {\n <div class=\"order-information__content-item\">\n <p class=\"order-information__content-item-title\">Notas de direcci\u00F3n</p>\n <p class=\"order-information__content-item-value\">{{ order.address_notes }}</p>\n </div>\n }\n </div>\n </div>\n}\n", styles: [".order-information{background-color:#fff;border-radius:.5rem;border:1px solid #f3f4f6;box-sizing:border-box;overflow:hidden;position:relative;width:100%}.order-information__header{align-items:center;border-bottom:1px solid #f3f4f6;display:flex;flex-flow:row wrap;gap:.75rem;justify-content:space-between;padding:1rem;width:100%}.order-information__header-id{color:#6b7280;font-size:.875rem;font-weight:700;margin:0}.order-information__header-uuid{color:#9ca3af;font-family:ui-monospace,SFMono-Regular,SF Mono,Menlo,Consolas,Liberation Mono,monospace;font-size:.75rem;margin:0;word-break:break-all}.order-information__content{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:1rem;padding:1rem}@media(min-width:768px){.order-information__content{grid-template-columns:repeat(3,minmax(0,1fr))}}.order-information__content-item{align-items:flex-start;display:flex;flex-flow:column nowrap;position:relative;width:100%}.order-information__content-item-title{color:#9ca3af;font-size:.75rem;margin:0;text-transform:uppercase}.order-information__content-item-value{color:#111827;font-weight:500;font-size:.875rem;margin:0}.order-information__content-item-value.total{font-weight:700}.order-information__content-item-total_discounted{display:flex;flex-flow:row nowrap;gap:.25rem;margin:0;width:100%}.order-information__content-item-total_discounted .discounted{color:#111827;font-size:.875rem;font-weight:700}.order-information__content-item-total_discounted .total{color:#9ca3af;margin:0;text-decoration:line-through}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "component", type: OrderStatusBadgeComponent, selector: "order-status-badge", inputs: ["order", "size"] }, { kind: "ngmodule", type: TranslocoModule }, { kind: "component", type: AppBadgeComponent, selector: "app-badge", inputs: ["text", "color", "size", "bordered", "backgroundColor", "textColor"] }, { kind: "pipe", type: i1$1.CurrencyPipe, name: "currency" }, { kind: "pipe", type: i1$1.DatePipe, name: "date" }, { kind: "pipe", type: i2.TranslocoPipe, name: "transloco" }], encapsulation: i0.ViewEncapsulation.None });
8344
+ payWithMercadoPago() {
8345
+ if (this.isLoading || !this.createMpPreference) {
8346
+ return;
8347
+ }
8348
+ this.isLoading = true;
8349
+ this.createMpPreference(this.order).subscribe({
8350
+ next: (preference) => {
8351
+ this.isLoading = false;
8352
+ if (preference?.init_point) {
8353
+ window.open(preference.init_point, '_blank');
8354
+ }
8355
+ this.paymentLinkCreated.emit(this.order);
8356
+ },
8357
+ error: (error) => {
8358
+ this.isLoading = false;
8359
+ const message = error?.error?.message || this.transloco.translate('order.mpPayButtonError');
8360
+ this.toastService.show(message, 'error');
8361
+ },
8362
+ });
8363
+ }
8364
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.25", ngImport: i0, type: OrderInformationComponent, deps: [{ token: i2.TranslocoService }, { token: ToastService }], target: i0.ɵɵFactoryTarget.Component });
8365
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.25", type: OrderInformationComponent, isStandalone: true, selector: "order-information", inputs: { order: "order", showPayButton: "showPayButton", createMpPreference: "createMpPreference" }, outputs: { paymentLinkCreated: "paymentLinkCreated" }, ngImport: i0, template: "@if (!!order) {\n <div class=\"order-information\">\n <div class=\"order-information__header\">\n <div>\n <p class=\"order-information__header-id\">Orden #{{ order.id }}</p>\n <p class=\"order-information__header-uuid\">{{ order.uuid }}</p>\n </div>\n\n <order-status-badge [order]=\"order\" />\n </div>\n\n <div class=\"order-information__content\">\n @if (order.show_snapshot && order.show_snapshot['title']) {\n <div class=\"order-information__content-item\">\n <p class=\"order-information__content-item-title\">Evento</p>\n <p class=\"order-information__content-item-value\">\n {{ order.show_snapshot['title'] }}\n </p>\n </div>\n }\n\n @if (order.performance_snapshot && order.performance_snapshot['start_time']) {\n <div class=\"order-information__content-item\">\n <p class=\"order-information__content-item-title\">Fecha de la funci\u00F3n</p>\n <p class=\"order-information__content-item-value\">\n {{ order.performance_snapshot['start_time'] | date: 'dd/MM/yyyy hh:mm a' }}\n </p>\n </div>\n }\n\n <div class=\"order-information__content-item\">\n <p class=\"order-information__content-item-title\">Fecha de la compra</p>\n <p class=\"order-information__content-item-value\">\n {{ order.created_at | date: 'dd/MM/yyyy hh:mm a' }}\n </p>\n </div>\n\n @if (order.payment_method) {\n <div class=\"order-information__content-item\">\n <p class=\"order-information__content-item-title\">M\u00E9todo de pago</p>\n <p class=\"order-information__content-item-value\">\n {{ `order.paymentMethods.${order.payment_method}` | transloco }}\n </p>\n </div>\n }\n\n @if (order.service_fee && order.service_fee > 0) {\n <div class=\"order-information__content-item\">\n <p class=\"order-information__content-item-title\">Tarifa de servicio</p>\n <p class=\"order-information__content-item-value\">\n ${{ order.service_fee | currency: 'COP' : '' : '1.0-2' }}\n </p>\n </div>\n }\n\n @if (!!order.discount_amount && order.discount_amount > 0) {\n <div class=\"order-information__content-item\">\n <p class=\"order-information__content-item-title\">Descuento</p>\n <p class=\"order-information__content-item-value\">\n ${{ order.discount_amount | currency: 'COP' : '' : '1.0-2' }}\n </p>\n </div>\n }\n\n <div class=\"order-information__content-item\">\n <p class=\"order-information__content-item-title\">Total</p>\n @if (order.total_discounted && order.total_discounted >= 0) {\n <p class=\"order-information__content-item-total_discounted\">\n <span class=\"discounted\">\n ${{ order.total_discounted | currency: 'COP' : '' : '1.0-2' }}\n </span>\n <span class=\"order-information__content-item-value total\">\n ${{ order.total | currency: 'COP' : '' : '1.0-2' }}\n </span>\n </p>\n } @else {\n <p class=\"order-information__content-item-value total\">\n ${{ order.total | currency: 'COP' : '' : '1.0-2' }}\n </p>\n }\n </div>\n\n <div class=\"order-information__content-item\">\n <p class=\"order-information__content-item-title\">T\u00E9rminos aceptados</p>\n <app-badge\n [text]=\"order.terms_accepted ? 'Aceptado' : 'No aceptado'\"\n [backgroundColor]=\"order.terms_accepted ? '#dcfce7' : '#fee2e2'\"\n [textColor]=\"order.terms_accepted ? '#16a34a' : '#dc2626'\"\n size=\"xs\"\n />\n </div>\n\n <div class=\"order-information__content-item\">\n <p class=\"order-information__content-item-title\">Procesamiento de datos aceptado</p>\n <app-badge\n [text]=\"order.data_processing_accepted ? 'Aceptado' : 'No aceptado'\"\n [backgroundColor]=\"order.data_processing_accepted ? '#dcfce7' : '#fee2e2'\"\n [textColor]=\"order.data_processing_accepted ? '#16a34a' : '#dc2626'\"\n size=\"xs\"\n />\n </div>\n\n @if (order.comments) {\n <div class=\"order-information__content-item\">\n <p class=\"order-information__content-item-title\">Comentarios</p>\n <p class=\"order-information__content-item-value\">{{ order.comments }}</p>\n </div>\n }\n\n @if (order.address_notes) {\n <div class=\"order-information__content-item\">\n <p class=\"order-information__content-item-title\">Notas de direcci\u00F3n</p>\n <p class=\"order-information__content-item-value\">{{ order.address_notes }}</p>\n </div>\n }\n\n @if (showMpButton) {\n <div class=\"order-information__content-item\">\n <app-button\n [text]=\"'order.mpPayButton' | transloco\"\n [loadingText]=\"'order.mpPayButtonLoading' | transloco\"\n [loading]=\"isLoading\"\n variant=\"primary\"\n size=\"md\"\n icon=\"ri-wallet-3-line\"\n (clicked)=\"payWithMercadoPago()\"\n />\n </div>\n }\n </div>\n </div>\n}\n", styles: [".order-information{background-color:#fff;border-radius:.5rem;border:1px solid #f3f4f6;box-sizing:border-box;overflow:hidden;position:relative;width:100%}.order-information__header{align-items:center;border-bottom:1px solid #f3f4f6;display:flex;flex-flow:row wrap;gap:.75rem;justify-content:space-between;padding:1rem;width:100%}.order-information__header-id{color:#6b7280;font-size:.875rem;font-weight:700;margin:0}.order-information__header-uuid{color:#9ca3af;font-family:ui-monospace,SFMono-Regular,SF Mono,Menlo,Consolas,Liberation Mono,monospace;font-size:.75rem;margin:0;word-break:break-all}.order-information__content{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:1rem;padding:1rem}@media(min-width:768px){.order-information__content{grid-template-columns:repeat(3,minmax(0,1fr))}}.order-information__content-item{align-items:flex-start;display:flex;flex-flow:column nowrap;position:relative;width:100%}.order-information__content-item-title{color:#9ca3af;font-size:.75rem;margin:0;text-transform:uppercase}.order-information__content-item-value{color:#111827;font-weight:500;font-size:.875rem;margin:0}.order-information__content-item-value.total{font-weight:700}.order-information__content-item-total_discounted{display:flex;flex-flow:row nowrap;gap:.25rem;margin:0;width:100%}.order-information__content-item-total_discounted .discounted{color:#111827;font-size:.875rem;font-weight:700}.order-information__content-item-total_discounted .total{color:#9ca3af;margin:0;text-decoration:line-through}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "component", type: OrderStatusBadgeComponent, selector: "order-status-badge", inputs: ["order", "size"] }, { kind: "ngmodule", type: TranslocoModule }, { kind: "component", type: AppBadgeComponent, selector: "app-badge", inputs: ["text", "color", "size", "bordered", "backgroundColor", "textColor"] }, { kind: "component", type: AppButtonComponent, selector: "app-button", inputs: ["disabled", "loading", "type", "variant", "text", "size", "loadingText", "icon", "tooltip"], outputs: ["clicked"] }, { kind: "pipe", type: i1$1.CurrencyPipe, name: "currency" }, { kind: "pipe", type: i1$1.DatePipe, name: "date" }, { kind: "pipe", type: i2.TranslocoPipe, name: "transloco" }], encapsulation: i0.ViewEncapsulation.None });
8332
8366
  }
8333
8367
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.25", ngImport: i0, type: OrderInformationComponent, decorators: [{
8334
8368
  type: Component,
8335
- args: [{ selector: 'order-information', standalone: true, imports: [CommonModule, OrderStatusBadgeComponent, TranslocoModule, AppBadgeComponent], encapsulation: ViewEncapsulation.None, template: "@if (!!order) {\n <div class=\"order-information\">\n <div class=\"order-information__header\">\n <div>\n <p class=\"order-information__header-id\">Orden #{{ order.id }}</p>\n <p class=\"order-information__header-uuid\">{{ order.uuid }}</p>\n </div>\n\n <order-status-badge [order]=\"order\" />\n </div>\n\n <div class=\"order-information__content\">\n @if (order.show_snapshot && order.show_snapshot['title']) {\n <div class=\"order-information__content-item\">\n <p class=\"order-information__content-item-title\">Evento</p>\n <p class=\"order-information__content-item-value\">\n {{ order.show_snapshot['title'] }}\n </p>\n </div>\n }\n\n @if (order.performance_snapshot && order.performance_snapshot['start_time']) {\n <div class=\"order-information__content-item\">\n <p class=\"order-information__content-item-title\">Fecha de la funci\u00F3n</p>\n <p class=\"order-information__content-item-value\">\n {{ order.performance_snapshot['start_time'] | date: 'dd/MM/yyyy hh:mm a' }}\n </p>\n </div>\n }\n\n <div class=\"order-information__content-item\">\n <p class=\"order-information__content-item-title\">Fecha de la compra</p>\n <p class=\"order-information__content-item-value\">\n {{ order.created_at | date: 'dd/MM/yyyy hh:mm a' }}\n </p>\n </div>\n\n @if (order.payment_method) {\n <div class=\"order-information__content-item\">\n <p class=\"order-information__content-item-title\">M\u00E9todo de pago</p>\n <p class=\"order-information__content-item-value\">\n {{ `order.paymentMethods.${order.payment_method}` | transloco }}\n </p>\n </div>\n }\n\n @if (order.service_fee && order.service_fee > 0) {\n <div class=\"order-information__content-item\">\n <p class=\"order-information__content-item-title\">Tarifa de servicio</p>\n <p class=\"order-information__content-item-value\">\n ${{ order.service_fee | currency: 'COP' : '' : '1.0-2' }}\n </p>\n </div>\n }\n\n @if (!!order.discount_amount && order.discount_amount > 0) {\n <div class=\"order-information__content-item\">\n <p class=\"order-information__content-item-title\">Descuento</p>\n <p class=\"order-information__content-item-value\">\n ${{ order.discount_amount | currency: 'COP' : '' : '1.0-2' }}\n </p>\n </div>\n }\n\n <div class=\"order-information__content-item\">\n <p class=\"order-information__content-item-title\">Total</p>\n @if (order.total_discounted && order.total_discounted >= 0) {\n <p class=\"order-information__content-item-total_discounted\">\n <span class=\"discounted\">\n ${{ order.total_discounted | currency: 'COP' : '' : '1.0-2' }}\n </span>\n <span class=\"order-information__content-item-value total\">\n ${{ order.total | currency: 'COP' : '' : '1.0-2' }}\n </span>\n </p>\n } @else {\n <p class=\"order-information__content-item-value total\">\n ${{ order.total | currency: 'COP' : '' : '1.0-2' }}\n </p>\n }\n </div>\n\n <div class=\"order-information__content-item\">\n <p class=\"order-information__content-item-title\">T\u00E9rminos aceptados</p>\n <app-badge\n [text]=\"order.terms_accepted ? 'Aceptado' : 'No aceptado'\"\n [backgroundColor]=\"order.terms_accepted ? '#dcfce7' : '#fee2e2'\"\n [textColor]=\"order.terms_accepted ? '#16a34a' : '#dc2626'\"\n size=\"xs\"\n />\n </div>\n\n <div class=\"order-information__content-item\">\n <p class=\"order-information__content-item-title\">Procesamiento de datos aceptado</p>\n <app-badge\n [text]=\"order.data_processing_accepted ? 'Aceptado' : 'No aceptado'\"\n [backgroundColor]=\"order.data_processing_accepted ? '#dcfce7' : '#fee2e2'\"\n [textColor]=\"order.data_processing_accepted ? '#16a34a' : '#dc2626'\"\n size=\"xs\"\n />\n </div>\n\n @if (order.comments) {\n <div class=\"order-information__content-item\">\n <p class=\"order-information__content-item-title\">Comentarios</p>\n <p class=\"order-information__content-item-value\">{{ order.comments }}</p>\n </div>\n }\n\n @if (order.address_notes) {\n <div class=\"order-information__content-item\">\n <p class=\"order-information__content-item-title\">Notas de direcci\u00F3n</p>\n <p class=\"order-information__content-item-value\">{{ order.address_notes }}</p>\n </div>\n }\n </div>\n </div>\n}\n", styles: [".order-information{background-color:#fff;border-radius:.5rem;border:1px solid #f3f4f6;box-sizing:border-box;overflow:hidden;position:relative;width:100%}.order-information__header{align-items:center;border-bottom:1px solid #f3f4f6;display:flex;flex-flow:row wrap;gap:.75rem;justify-content:space-between;padding:1rem;width:100%}.order-information__header-id{color:#6b7280;font-size:.875rem;font-weight:700;margin:0}.order-information__header-uuid{color:#9ca3af;font-family:ui-monospace,SFMono-Regular,SF Mono,Menlo,Consolas,Liberation Mono,monospace;font-size:.75rem;margin:0;word-break:break-all}.order-information__content{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:1rem;padding:1rem}@media(min-width:768px){.order-information__content{grid-template-columns:repeat(3,minmax(0,1fr))}}.order-information__content-item{align-items:flex-start;display:flex;flex-flow:column nowrap;position:relative;width:100%}.order-information__content-item-title{color:#9ca3af;font-size:.75rem;margin:0;text-transform:uppercase}.order-information__content-item-value{color:#111827;font-weight:500;font-size:.875rem;margin:0}.order-information__content-item-value.total{font-weight:700}.order-information__content-item-total_discounted{display:flex;flex-flow:row nowrap;gap:.25rem;margin:0;width:100%}.order-information__content-item-total_discounted .discounted{color:#111827;font-size:.875rem;font-weight:700}.order-information__content-item-total_discounted .total{color:#9ca3af;margin:0;text-decoration:line-through}\n"] }]
8336
- }], ctorParameters: () => [{ type: i2.TranslocoService }], propDecorators: { order: [{
8369
+ args: [{ selector: 'order-information', standalone: true, imports: [
8370
+ CommonModule,
8371
+ OrderStatusBadgeComponent,
8372
+ TranslocoModule,
8373
+ AppBadgeComponent,
8374
+ AppButtonComponent,
8375
+ ], encapsulation: ViewEncapsulation.None, template: "@if (!!order) {\n <div class=\"order-information\">\n <div class=\"order-information__header\">\n <div>\n <p class=\"order-information__header-id\">Orden #{{ order.id }}</p>\n <p class=\"order-information__header-uuid\">{{ order.uuid }}</p>\n </div>\n\n <order-status-badge [order]=\"order\" />\n </div>\n\n <div class=\"order-information__content\">\n @if (order.show_snapshot && order.show_snapshot['title']) {\n <div class=\"order-information__content-item\">\n <p class=\"order-information__content-item-title\">Evento</p>\n <p class=\"order-information__content-item-value\">\n {{ order.show_snapshot['title'] }}\n </p>\n </div>\n }\n\n @if (order.performance_snapshot && order.performance_snapshot['start_time']) {\n <div class=\"order-information__content-item\">\n <p class=\"order-information__content-item-title\">Fecha de la funci\u00F3n</p>\n <p class=\"order-information__content-item-value\">\n {{ order.performance_snapshot['start_time'] | date: 'dd/MM/yyyy hh:mm a' }}\n </p>\n </div>\n }\n\n <div class=\"order-information__content-item\">\n <p class=\"order-information__content-item-title\">Fecha de la compra</p>\n <p class=\"order-information__content-item-value\">\n {{ order.created_at | date: 'dd/MM/yyyy hh:mm a' }}\n </p>\n </div>\n\n @if (order.payment_method) {\n <div class=\"order-information__content-item\">\n <p class=\"order-information__content-item-title\">M\u00E9todo de pago</p>\n <p class=\"order-information__content-item-value\">\n {{ `order.paymentMethods.${order.payment_method}` | transloco }}\n </p>\n </div>\n }\n\n @if (order.service_fee && order.service_fee > 0) {\n <div class=\"order-information__content-item\">\n <p class=\"order-information__content-item-title\">Tarifa de servicio</p>\n <p class=\"order-information__content-item-value\">\n ${{ order.service_fee | currency: 'COP' : '' : '1.0-2' }}\n </p>\n </div>\n }\n\n @if (!!order.discount_amount && order.discount_amount > 0) {\n <div class=\"order-information__content-item\">\n <p class=\"order-information__content-item-title\">Descuento</p>\n <p class=\"order-information__content-item-value\">\n ${{ order.discount_amount | currency: 'COP' : '' : '1.0-2' }}\n </p>\n </div>\n }\n\n <div class=\"order-information__content-item\">\n <p class=\"order-information__content-item-title\">Total</p>\n @if (order.total_discounted && order.total_discounted >= 0) {\n <p class=\"order-information__content-item-total_discounted\">\n <span class=\"discounted\">\n ${{ order.total_discounted | currency: 'COP' : '' : '1.0-2' }}\n </span>\n <span class=\"order-information__content-item-value total\">\n ${{ order.total | currency: 'COP' : '' : '1.0-2' }}\n </span>\n </p>\n } @else {\n <p class=\"order-information__content-item-value total\">\n ${{ order.total | currency: 'COP' : '' : '1.0-2' }}\n </p>\n }\n </div>\n\n <div class=\"order-information__content-item\">\n <p class=\"order-information__content-item-title\">T\u00E9rminos aceptados</p>\n <app-badge\n [text]=\"order.terms_accepted ? 'Aceptado' : 'No aceptado'\"\n [backgroundColor]=\"order.terms_accepted ? '#dcfce7' : '#fee2e2'\"\n [textColor]=\"order.terms_accepted ? '#16a34a' : '#dc2626'\"\n size=\"xs\"\n />\n </div>\n\n <div class=\"order-information__content-item\">\n <p class=\"order-information__content-item-title\">Procesamiento de datos aceptado</p>\n <app-badge\n [text]=\"order.data_processing_accepted ? 'Aceptado' : 'No aceptado'\"\n [backgroundColor]=\"order.data_processing_accepted ? '#dcfce7' : '#fee2e2'\"\n [textColor]=\"order.data_processing_accepted ? '#16a34a' : '#dc2626'\"\n size=\"xs\"\n />\n </div>\n\n @if (order.comments) {\n <div class=\"order-information__content-item\">\n <p class=\"order-information__content-item-title\">Comentarios</p>\n <p class=\"order-information__content-item-value\">{{ order.comments }}</p>\n </div>\n }\n\n @if (order.address_notes) {\n <div class=\"order-information__content-item\">\n <p class=\"order-information__content-item-title\">Notas de direcci\u00F3n</p>\n <p class=\"order-information__content-item-value\">{{ order.address_notes }}</p>\n </div>\n }\n\n @if (showMpButton) {\n <div class=\"order-information__content-item\">\n <app-button\n [text]=\"'order.mpPayButton' | transloco\"\n [loadingText]=\"'order.mpPayButtonLoading' | transloco\"\n [loading]=\"isLoading\"\n variant=\"primary\"\n size=\"md\"\n icon=\"ri-wallet-3-line\"\n (clicked)=\"payWithMercadoPago()\"\n />\n </div>\n }\n </div>\n </div>\n}\n", styles: [".order-information{background-color:#fff;border-radius:.5rem;border:1px solid #f3f4f6;box-sizing:border-box;overflow:hidden;position:relative;width:100%}.order-information__header{align-items:center;border-bottom:1px solid #f3f4f6;display:flex;flex-flow:row wrap;gap:.75rem;justify-content:space-between;padding:1rem;width:100%}.order-information__header-id{color:#6b7280;font-size:.875rem;font-weight:700;margin:0}.order-information__header-uuid{color:#9ca3af;font-family:ui-monospace,SFMono-Regular,SF Mono,Menlo,Consolas,Liberation Mono,monospace;font-size:.75rem;margin:0;word-break:break-all}.order-information__content{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:1rem;padding:1rem}@media(min-width:768px){.order-information__content{grid-template-columns:repeat(3,minmax(0,1fr))}}.order-information__content-item{align-items:flex-start;display:flex;flex-flow:column nowrap;position:relative;width:100%}.order-information__content-item-title{color:#9ca3af;font-size:.75rem;margin:0;text-transform:uppercase}.order-information__content-item-value{color:#111827;font-weight:500;font-size:.875rem;margin:0}.order-information__content-item-value.total{font-weight:700}.order-information__content-item-total_discounted{display:flex;flex-flow:row nowrap;gap:.25rem;margin:0;width:100%}.order-information__content-item-total_discounted .discounted{color:#111827;font-size:.875rem;font-weight:700}.order-information__content-item-total_discounted .total{color:#9ca3af;margin:0;text-decoration:line-through}\n"] }]
8376
+ }], ctorParameters: () => [{ type: i2.TranslocoService }, { type: ToastService }], propDecorators: { order: [{
8337
8377
  type: Input,
8338
8378
  args: [{ required: true }]
8379
+ }], showPayButton: [{
8380
+ type: Input
8381
+ }], createMpPreference: [{
8382
+ type: Input
8383
+ }], paymentLinkCreated: [{
8384
+ type: Output
8339
8385
  }] } });
8340
8386
 
8341
8387
  class OrderItemTypeBadgeComponent {