2 lines
24 KiB
JavaScript
2 lines
24 KiB
JavaScript
import{a as Ft}from"./chunk-4E7NWUSO.js";import{a as _t,b as Ct,c as ht,d as xt,e as Mt,f as Pt,g as bt,h as Ot,i as vt,j as yt,k as St}from"./chunk-CAFW6QNR.js";import"./chunk-MS4AQ6UA.js";import{a as Dt,b as Et}from"./chunk-GIRDLTGV.js";import{a as Qt}from"./chunk-RDQGS2XZ.js";import{c as wt}from"./chunk-P3ICZX4Q.js";import{d as Tt}from"./chunk-37GOEORY.js";import{a as qt,b as At,c as kt,d as zt,e as Nt,f as It,g as A}from"./chunk-YWCH6MM5.js";import"./chunk-66PBOFKL.js";import"./chunk-NYYADJNO.js";import{b as at,c as rt}from"./chunk-R3PUHZUP.js";import"./chunk-3RK6DDJD.js";import{a as ot}from"./chunk-7XDVX5KB.js";import{a as ft}from"./chunk-B4CGVF35.js";import{b as ut}from"./chunk-NIBVQDYD.js";import"./chunk-LLJSP5R2.js";import"./chunk-HMKN2VB2.js";import{a as dt}from"./chunk-3NOMFGTV.js";import"./chunk-M5XZ5N2D.js";import{b as gt,g as pt}from"./chunk-TAS7XC6E.js";import{a as st}from"./chunk-GMUETU5N.js";import"./chunk-3GOV5KJM.js";import"./chunk-TPLZKWZ7.js";import{b as et,e as nt,i as it}from"./chunk-EGL4ZKWQ.js";import"./chunk-GPI43RSU.js";import{a as Y,c as Z,i as tt}from"./chunk-6NRCTHHS.js";import"./chunk-RC3JXGN6.js";import{a as mt,b as ct}from"./chunk-N6VRXIQE.js";import{b as $,f as H,g as G,l as U,o as W,r as J,x as K,z as X}from"./chunk-GWD5A44H.js";import"./chunk-52JZ5I3Y.js";import{Aa as q,j as D,ua as lt,w as B,wa as E,ya as Q,za as T}from"./chunk-COFYR5MX.js";import{Db as b,Eb as O,Ec as w,F as z,Hb as R,I as N,Ib as V,J as I,Jb as g,Kb as t,Lb as e,Mb as v,Qb as p,Rb as u,Tb as y,Xb as s,Za as l,Zb as c,da as C,ia as h,ib as F,ja as x,lc as i,mc as f,nc as P,ob as S,oc as L,ta as M,ub as d,vc as j}from"./chunk-2MUIW2M6.js";function $t(o,n){if(o&1&&(t(0,"div",5)(1,"strong"),i(2,"Item:"),e(),t(3,"p"),i(4),e()()),o&2){let a=c();l(4),f(a.data.itemName)}}var k=class o{constructor(n,a){this.dialogRef=n;this.data=a}onCancel(){this.dialogRef.close(!1)}onConfirm(){this.dialogRef.close(!0)}static \u0275fac=function(a){return new(a||o)(F(qt),F(At))};static \u0275cmp=S({type:o,selectors:[["app-delete-confirm-dialog"]],decls:22,vars:5,consts:[[1,"delete-dialog"],[1,"dialog-header"],[1,"warning-icon"],["mat-dialog-title",""],[1,"dialog-message"],[1,"item-preview"],[1,"warning-box"],["align","end"],["mat-button","",3,"click"],["mat-raised-button","","color","warn","cdkFocusInitial","",3,"click"]],template:function(a,r){a&1&&(t(0,"div",0)(1,"div",1)(2,"mat-icon",2),i(3,"warning"),e(),t(4,"h2",3),i(5),e()(),t(6,"mat-dialog-content")(7,"p",4),i(8),e(),b(9,$t,5,1,"div",5),t(10,"div",6)(11,"mat-icon"),i(12,"info"),e(),t(13,"span"),i(14,"This action cannot be undone."),e()()(),t(15,"mat-dialog-actions",7)(16,"button",8),s("click",function(){return r.onCancel()}),i(17),e(),t(18,"button",9),s("click",function(){return r.onConfirm()}),t(19,"mat-icon"),i(20,"delete"),e(),i(21),e()()()),a&2&&(l(5),f(r.data.title),l(3),f(r.data.message),l(),O(r.data.itemName?9:-1),l(8),P(" ",r.data.cancelText||"Cancel"," "),l(4),P(" ",r.data.confirmText||"Delete"," "))},dependencies:[D,A,zt,It,Nt,Q,E,q,T],styles:[".delete-dialog[_ngcontent-%COMP%]{min-width:400px}@media (max-width: 600px){.delete-dialog[_ngcontent-%COMP%]{min-width:unset}}.dialog-header[_ngcontent-%COMP%]{display:flex;align-items:center;gap:1rem;margin-bottom:1rem}.dialog-header[_ngcontent-%COMP%] .warning-icon[_ngcontent-%COMP%]{font-size:2.5rem;width:2.5rem;height:2.5rem;color:#f44336}.dialog-header[_ngcontent-%COMP%] h2[_ngcontent-%COMP%]{margin:0;font-size:1.5rem;font-weight:500}mat-dialog-content[_ngcontent-%COMP%]{padding:0 1rem 1.5rem}mat-dialog-content[_ngcontent-%COMP%] .dialog-message[_ngcontent-%COMP%]{margin:0 0 1rem;line-height:1.6;color:var(--text-secondary)}mat-dialog-content[_ngcontent-%COMP%] .item-preview[_ngcontent-%COMP%]{margin:1rem 0;padding:1rem;background-color:var(--background-light);border-radius:8px;border-left:4px solid var(--primary-color)}mat-dialog-content[_ngcontent-%COMP%] .item-preview[_ngcontent-%COMP%] strong[_ngcontent-%COMP%]{display:block;margin-bottom:.5rem;font-size:.875rem;color:var(--text-secondary)}mat-dialog-content[_ngcontent-%COMP%] .item-preview[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{margin:0;font-size:.95rem;color:var(--text-primary);word-break:break-word}mat-dialog-content[_ngcontent-%COMP%] .warning-box[_ngcontent-%COMP%]{display:flex;align-items:center;gap:.75rem;padding:.75rem 1rem;background-color:#fff3e0;border-radius:6px;border-left:4px solid #ff9800}mat-dialog-content[_ngcontent-%COMP%] .warning-box[_ngcontent-%COMP%] mat-icon[_ngcontent-%COMP%]{font-size:1.25rem;width:1.25rem;height:1.25rem;color:#f57c00}mat-dialog-content[_ngcontent-%COMP%] .warning-box[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{font-size:.875rem;color:#e65100;font-weight:500}mat-dialog-actions[_ngcontent-%COMP%]{padding:1rem;gap:.75rem}mat-dialog-actions[_ngcontent-%COMP%] button[_ngcontent-%COMP%]{min-width:100px}mat-dialog-actions[_ngcontent-%COMP%] button[_ngcontent-%COMP%] mat-icon[_ngcontent-%COMP%]{margin-right:.5rem;font-size:1.25rem;width:1.25rem;height:1.25rem}@media (prefers-color-scheme: dark){.delete-dialog[_ngcontent-%COMP%]{--text-primary: #e0e0e0;--text-secondary: #a0a0a0;--background-light: rgba(255, 255, 255, .05)}mat-dialog-content[_ngcontent-%COMP%] .warning-box[_ngcontent-%COMP%]{background-color:#ff980026;border-left-color:#ff9800}mat-dialog-content[_ngcontent-%COMP%] .warning-box[_ngcontent-%COMP%] mat-icon[_ngcontent-%COMP%]{color:#ffb74d}mat-dialog-content[_ngcontent-%COMP%] .warning-box[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{color:#ffb74d}}@media (prefers-color-scheme: light){.delete-dialog[_ngcontent-%COMP%]{--text-primary: #212121;--text-secondary: #757575;--background-light: #f5f5f5}}"]})};var Ht=()=>[10,25,50,100],Gt=(o,n)=>n.id;function Ut(o,n){if(o&1&&(t(0,"mat-option",15),i(1),e()),o&2){let a=n.$implicit;g("value",a.id),l(),f(a.name)}}function Wt(o,n){o&1&&(t(0,"div",33),v(1,"mat-spinner",36),t(2,"p"),i(3,"Loading questions..."),e()())}function Jt(o,n){if(o&1){let a=y();t(0,"div",34)(1,"mat-icon",37),i(2,"error"),e(),t(3,"p"),i(4),e(),t(5,"button",6),s("click",function(){h(a);let m=c();return x(m.loadQuestions())}),t(6,"mat-icon"),i(7,"refresh"),e(),i(8," Retry "),e()()}if(o&2){let a=c();l(4),f(a.error())}}function Kt(o,n){if(o&1){let a=y();t(0,"div",35)(1,"mat-icon"),i(2,"quiz"),e(),t(3,"h3"),i(4,"No Questions Found"),e(),t(5,"p"),i(6,"No questions match your current filters. Try adjusting your search criteria."),e(),t(7,"button",6),s("click",function(){h(a);let m=c();return x(m.createQuestion())}),t(8,"mat-icon"),i(9,"add"),e(),i(10," Create First Question "),e()()}}function Xt(o,n){o&1&&(t(0,"th",52),i(1,"Question"),e())}function Yt(o,n){if(o&1&&(t(0,"td",53)(1,"div",54),i(2),e()()),o&2){let a=n.$implicit;l(2),L(" ",a.questionText.substring(0,100),"",a.questionText.length>100?"...":""," ")}}function Zt(o,n){o&1&&(t(0,"th",52),i(1,"Type"),e())}function te(o,n){o&1&&(t(0,"mat-icon"),i(1,"radio_button_checked"),e(),t(2,"span",55),i(3," MCQ"),e())}function ee(o,n){o&1&&(t(0,"mat-icon"),i(1,"check_circle"),e(),t(2,"span"),i(3," T/F"),e())}function ne(o,n){o&1&&(t(0,"mat-icon"),i(1,"edit_note"),e(),t(2,"span"),i(3," Written"),e())}function ie(o,n){if(o&1&&(t(0,"td",53)(1,"mat-chip"),b(2,te,4,0)(3,ee,4,0)(4,ne,4,0),e()()),o&2){let a=n.$implicit;l(2),O(a.questionType==="multiple"?2:a.questionType==="trueFalse"?3:4)}}function oe(o,n){o&1&&(t(0,"th",52),i(1,"Category"),e())}function ae(o,n){if(o&1&&(t(0,"td",53),i(1),e()),o&2){let a=n.$implicit,r=c(2);l(),P(" ",r.getCategoryName(a)," ")}}function re(o,n){o&1&&(t(0,"th",52),i(1,"Difficulty"),e())}function le(o,n){if(o&1&&(t(0,"td",53)(1,"mat-chip",56),i(2),e()()),o&2){let a=n.$implicit,r=c(2);l(),g("color",r.getDifficultyColor(a.difficulty)),l(),P(" ",a.difficulty," ")}}function me(o,n){o&1&&(t(0,"th",52),i(1,"Points"),e())}function ce(o,n){if(o&1&&(t(0,"td",53)(1,"span",57),i(2),e()()),o&2){let a=n.$implicit;l(2),f(a.points)}}function se(o,n){o&1&&(t(0,"th",52),i(1,"Status"),e())}function de(o,n){if(o&1&&(t(0,"td",53)(1,"mat-chip",56),i(2),e()()),o&2){let a=n.$implicit,r=c(2);l(),g("color",r.getStatusColor(a.isActive)),l(),P(" ",a.isActive?"Active":"Inactive"," ")}}function ge(o,n){o&1&&(t(0,"th",52),i(1,"Actions"),e())}function pe(o,n){if(o&1){let a=y();t(0,"td",53)(1,"div",58)(2,"button",59),s("click",function(){let m=h(a).$implicit,_=c(2);return x(_.editQuestion(m))}),t(3,"mat-icon"),i(4,"edit"),e()(),t(5,"button",60),s("click",function(){let m=h(a).$implicit,_=c(2);return x(_.deleteQuestion(m))}),t(6,"mat-icon"),i(7,"delete"),e()()()()}}function ue(o,n){o&1&&v(0,"tr",61)}function fe(o,n){o&1&&v(0,"tr",62)}function _e(o,n){if(o&1){let a=y();t(0,"div",38)(1,"table",39),p(2,40),d(3,Xt,2,0,"th",41)(4,Yt,3,2,"td",42),u(),p(5,43),d(6,Zt,2,0,"th",41)(7,ie,5,1,"td",42),u(),p(8,44),d(9,oe,2,0,"th",41)(10,ae,2,1,"td",42),u(),p(11,45),d(12,re,2,0,"th",41)(13,le,3,2,"td",42),u(),p(14,46),d(15,me,2,0,"th",41)(16,ce,3,1,"td",42),u(),p(17,47),d(18,se,2,0,"th",41)(19,de,3,2,"td",42),u(),p(20,48),d(21,ge,2,0,"th",41)(22,pe,8,0,"td",42),u(),d(23,ue,1,0,"tr",49)(24,fe,1,0,"tr",50),e()(),t(25,"app-pagination",51),s("pageChange",function(m){h(a);let _=c();return x(_.goToPage(m))})("pageSizeChange",function(m){h(a);let _=c();return x(_.onPageSizeChange(m))}),e()}if(o&2){let a=c();l(),g("dataSource",a.questions()),l(22),g("matHeaderRowDef",a.displayedColumns),l(),g("matRowDefColumns",a.displayedColumns),l(),g("state",a.paginationState())("pageNumbers",a.pageNumbers())("pageSizeOptions",j(8,Ht))("showFirstLast",!0)("itemLabel","questions")}}var Rt=class o{adminService=C(Qt);categoryService=C(st);router=C(B);fb=C(K);dialog=C(kt);paginationService=C(dt);questions=M([]);isLoading=M(!1);error=M(null);categories=this.categoryService.categories;currentPage=M(1);pageSize=M(10);totalQuestions=M(0);totalPages=w(()=>Math.ceil(this.totalQuestions()/this.pageSize()));paginationState=w(()=>this.paginationService.calculatePaginationState({currentPage:this.currentPage(),pageSize:this.pageSize(),totalItems:this.totalQuestions()}));pageNumbers=w(()=>this.paginationService.calculatePageNumbers(this.currentPage(),this.totalPages(),5));displayedColumns=["questionText","type","category","difficulty","points","status","actions"];filterForm;Math=Math;ngOnInit(){this.initializeFilterForm(),this.setupSearchDebounce(),this.loadCategories(),this.loadQuestions()}initializeFilterForm(){this.filterForm=this.fb.group({search:[""],category:["all"],difficulty:["all"],type:["all"],sortBy:["createdAt"],sortOrder:["desc"]}),this.filterForm.valueChanges.pipe(z(300),N()).subscribe(()=>{this.currentPage.set(1),this.loadQuestions()})}setupSearchDebounce(){this.filterForm.get("search")?.valueChanges.pipe(z(500),N()).subscribe(()=>{this.currentPage.set(1),this.loadQuestions()})}loadCategories(){this.categories().length===0&&this.categoryService.getCategories().subscribe()}loadQuestions(){this.isLoading.set(!0),this.error.set(null);let n=this.filterForm.value,a={page:this.currentPage(),limit:this.pageSize(),search:n.search||void 0,category:n.category!=="all"?n.category:void 0,difficulty:n.difficulty!=="all"?n.difficulty:void 0,sortBy:n.sortBy,order:n.sortOrder};Object.keys(a).forEach(r=>a[r]===void 0&&delete a[r]),this.adminService.getAllQuestions(a).pipe(I(()=>this.isLoading.set(!1))).subscribe({next:r=>{this.questions.set(r.data),this.totalQuestions.set(r.total),this.currentPage.set(r.page)},error:r=>{this.error.set(r.message||"Failed to load questions"),this.questions.set([]),this.totalQuestions.set(0),console.error("Load questions error:",r)}})}createQuestion(){this.router.navigate(["/admin/questions/new"])}editQuestion(n){this.router.navigate(["/admin/questions",n.id,"edit"])}deleteQuestion(n){this.dialog.open(k,{width:"500px",data:{title:"Delete Question",message:"Are you sure you want to delete this question? This action cannot be undone.",itemName:n.questionText.substring(0,100)+(n.questionText.length>100?"...":""),confirmText:"Delete",cancelText:"Cancel"}}).afterClosed().subscribe(r=>{r&&n.id&&this.performDelete(n.id)})}performDelete(n){this.isLoading.set(!0),this.adminService.deleteQuestion(n).pipe(I(()=>this.isLoading.set(!1))).subscribe({next:()=>{this.loadQuestions()},error:a=>{this.error.set("Failed to delete question"),console.error("Delete error:",a)}})}getCategoryName(n){if(n.category?.name)return n.category.name;if(n.categoryId){let a=this.categories().find(r=>r.id===n.categoryId||r.id===n.categoryId.toString());if(a)return a.name}return n.categoryName||"Unknown"}getStatusColor(n){return n?"primary":"warn"}getDifficultyColor(n){switch(n.toLowerCase()){case"easy":return"primary";case"medium":return"accent";case"hard":return"warn";default:return""}}goToPage(n){n>=1&&n<=this.totalPages()&&(this.currentPage.set(n),this.loadQuestions())}onPageSizeChange(n){this.pageSize.set(n),this.currentPage.set(1),this.loadQuestions()}static \u0275fac=function(a){return new(a||o)};static \u0275cmp=S({type:o,selectors:[["app-admin-questions"]],decls:81,vars:2,consts:[[1,"admin-questions-container"],[1,"page-header"],[1,"header-content"],[1,"title-section"],[1,"header-icon"],[1,"subtitle"],["mat-raised-button","","color","primary",3,"click"],[1,"filters-card"],[1,"filters-form",3,"formGroup"],["appearance","outline",1,"search-field"],["matInput","","formControlName","search","placeholder","Search by question text..."],["matPrefix",""],["appearance","outline"],["formControlName","category"],["value","all"],[3,"value"],["formControlName","difficulty"],["value","easy"],["value","medium"],["value","hard"],["formControlName","type"],["value","multiple"],["value","trueFalse"],["value","written"],["formControlName","sortBy"],["value","createdAt"],["value","questionText"],["value","difficulty"],["value","points"],["formControlName","sortOrder"],["value","asc"],["value","desc"],[1,"results-card"],[1,"loading-container"],[1,"error-container"],[1,"empty-container"],["diameter","50"],["color","warn"],[1,"table-container"],["mat-table","",1,"questions-table",3,"dataSource"],["matColumnDef","questionText"],["mat-header-cell","",4,"matHeaderCellDef"],["mat-cell","",4,"matCellDef"],["matColumnDef","type"],["matColumnDef","category"],["matColumnDef","difficulty"],["matColumnDef","points"],["matColumnDef","status"],["matColumnDef","actions"],["mat-header-row","",4,"matHeaderRowDef"],["mat-row","",4,"matRowDef","matRowDefColumns"],[3,"pageChange","pageSizeChange","state","pageNumbers","pageSizeOptions","showFirstLast","itemLabel"],["mat-header-cell",""],["mat-cell",""],[1,"question-text-cell"],[1,"px-5"],[3,"color"],[1,"points-badge"],[1,"action-buttons"],["mat-icon-button","","color","primary","matTooltip","Edit Question",3,"click"],["mat-icon-button","","color","warn","matTooltip","Delete Question",3,"click"],["mat-header-row",""],["mat-row",""]],template:function(a,r){a&1&&(t(0,"div",0)(1,"div",1)(2,"div",2)(3,"div",3)(4,"mat-icon",4),i(5,"quiz"),e(),t(6,"div")(7,"h1"),i(8,"Question Management"),e(),t(9,"p",5),i(10,"Create, edit, and manage quiz questions"),e()()(),t(11,"button",6),s("click",function(){return r.createQuestion()}),t(12,"mat-icon"),i(13,"add"),e(),i(14," Create Question "),e()()(),t(15,"mat-card",7)(16,"mat-card-content")(17,"form",8)(18,"mat-form-field",9)(19,"mat-label"),i(20,"Search Questions"),e(),v(21,"input",10),t(22,"mat-icon",11),i(23,"search"),e()(),t(24,"mat-form-field",12)(25,"mat-label"),i(26,"Category"),e(),t(27,"mat-select",13)(28,"mat-option",14),i(29,"All Categories"),e(),R(30,Ut,2,2,"mat-option",15,Gt),e()(),t(32,"mat-form-field",12)(33,"mat-label"),i(34,"Difficulty"),e(),t(35,"mat-select",16)(36,"mat-option",14),i(37,"All Difficulties"),e(),t(38,"mat-option",17),i(39,"Easy"),e(),t(40,"mat-option",18),i(41,"Medium"),e(),t(42,"mat-option",19),i(43,"Hard"),e()()(),t(44,"mat-form-field",12)(45,"mat-label"),i(46,"Type"),e(),t(47,"mat-select",20)(48,"mat-option",14),i(49,"All Types"),e(),t(50,"mat-option",21),i(51,"Multiple Choice"),e(),t(52,"mat-option",22),i(53,"True/False"),e(),t(54,"mat-option",23),i(55,"Written"),e()()(),t(56,"mat-form-field",12)(57,"mat-label"),i(58,"Sort By"),e(),t(59,"mat-select",24)(60,"mat-option",25),i(61,"Date Created"),e(),t(62,"mat-option",26),i(63,"Question Text"),e(),t(64,"mat-option",27),i(65,"Difficulty"),e(),t(66,"mat-option",28),i(67,"Points"),e()()(),t(68,"mat-form-field",12)(69,"mat-label"),i(70,"Order"),e(),t(71,"mat-select",29)(72,"mat-option",30),i(73,"Ascending"),e(),t(74,"mat-option",31),i(75,"Descending"),e()()()()()(),t(76,"mat-card",32),b(77,Wt,4,0,"div",33)(78,Jt,9,1,"div",34)(79,Kt,11,0,"div",35)(80,_e,26,9),e()()),a&2&&(l(17),g("formGroup",r.filterForm),l(13),V(r.categories()),l(47),O(r.isLoading()?77:r.error()?78:r.questions().length===0?79:80))},dependencies:[D,X,U,$,H,G,W,J,tt,Y,Z,Q,E,lt,q,T,St,_t,ht,bt,xt,Ct,Ot,Mt,Pt,vt,yt,rt,at,it,et,nt,ot,Et,Dt,wt,ct,mt,ft,ut,pt,gt,Tt,A,Ft],styles:[".admin-questions-container[_ngcontent-%COMP%]{max-width:1400px;margin:0 auto;padding:2rem}@media (max-width: 768px){.admin-questions-container[_ngcontent-%COMP%]{padding:1rem}}.page-header[_ngcontent-%COMP%]{margin-bottom:2rem}.page-header[_ngcontent-%COMP%] .header-content[_ngcontent-%COMP%]{display:flex;justify-content:space-between;align-items:center;gap:1rem}@media (max-width: 768px){.page-header[_ngcontent-%COMP%] .header-content[_ngcontent-%COMP%]{flex-direction:column;align-items:flex-start}}.page-header[_ngcontent-%COMP%] .title-section[_ngcontent-%COMP%]{display:flex;align-items:center;gap:1rem}.page-header[_ngcontent-%COMP%] .title-section[_ngcontent-%COMP%] .header-icon[_ngcontent-%COMP%]{font-size:2.5rem;width:2.5rem;height:2.5rem;color:var(--primary-color)}.page-header[_ngcontent-%COMP%] .title-section[_ngcontent-%COMP%] h1[_ngcontent-%COMP%]{margin:0;font-size:2rem;font-weight:600;color:var(--text-primary)}.page-header[_ngcontent-%COMP%] .title-section[_ngcontent-%COMP%] .subtitle[_ngcontent-%COMP%]{margin:.25rem 0 0;font-size:.95rem;color:var(--text-secondary)}.page-header[_ngcontent-%COMP%] button[_ngcontent-%COMP%]{height:42px;padding:0 1.5rem}@media (max-width: 768px){.page-header[_ngcontent-%COMP%] button[_ngcontent-%COMP%]{width:100%}}.page-header[_ngcontent-%COMP%] button[_ngcontent-%COMP%] mat-icon[_ngcontent-%COMP%]{margin-right:.5rem}.filters-card[_ngcontent-%COMP%]{margin-bottom:1.5rem}.filters-card[_ngcontent-%COMP%] .filters-form[_ngcontent-%COMP%]{display:grid;grid-template-columns:repeat(auto-fit,minmax(200px,1fr));gap:1rem}@media (max-width: 768px){.filters-card[_ngcontent-%COMP%] .filters-form[_ngcontent-%COMP%]{grid-template-columns:1fr}}.filters-card[_ngcontent-%COMP%] .filters-form[_ngcontent-%COMP%] .search-field[_ngcontent-%COMP%]{grid-column:span 2}@media (max-width: 768px){.filters-card[_ngcontent-%COMP%] .filters-form[_ngcontent-%COMP%] .search-field[_ngcontent-%COMP%]{grid-column:span 1}}.filters-card[_ngcontent-%COMP%] .filters-form[_ngcontent-%COMP%] mat-form-field[_ngcontent-%COMP%]{width:100%}.results-card[_ngcontent-%COMP%]{min-height:400px}.loading-container[_ngcontent-%COMP%]{display:flex;flex-direction:column;align-items:center;justify-content:center;padding:4rem 2rem;gap:1.5rem}.loading-container[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{margin:0;font-size:1rem;color:var(--text-secondary)}.error-container[_ngcontent-%COMP%]{display:flex;flex-direction:column;align-items:center;justify-content:center;padding:4rem 2rem;gap:1rem}.error-container[_ngcontent-%COMP%] mat-icon[_ngcontent-%COMP%]{font-size:4rem;width:4rem;height:4rem}.error-container[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{margin:0;font-size:1rem;color:var(--text-secondary);text-align:center}.empty-container[_ngcontent-%COMP%]{display:flex;flex-direction:column;align-items:center;justify-content:center;padding:4rem 2rem;gap:1rem}.empty-container[_ngcontent-%COMP%] mat-icon[_ngcontent-%COMP%]{font-size:5rem;width:5rem;height:5rem;color:var(--text-disabled)}.empty-container[_ngcontent-%COMP%] h3[_ngcontent-%COMP%]{margin:0;font-size:1.5rem;font-weight:500;color:var(--text-primary)}.empty-container[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{margin:0;font-size:1rem;color:var(--text-secondary);text-align:center;max-width:500px}.empty-container[_ngcontent-%COMP%] button[_ngcontent-%COMP%]{margin-top:1rem}.table-container[_ngcontent-%COMP%]{overflow-x:auto}@media (max-width: 768px){.table-container[_ngcontent-%COMP%]{margin:-1rem;padding:1rem}}.questions-table[_ngcontent-%COMP%]{width:100%;background:transparent}.questions-table[_ngcontent-%COMP%] th[_ngcontent-%COMP%]{font-weight:600;font-size:.875rem;text-transform:uppercase;color:var(--text-secondary);padding:1rem}.questions-table[_ngcontent-%COMP%] td[_ngcontent-%COMP%]{padding:1rem;color:var(--text-primary)}.questions-table[_ngcontent-%COMP%] tr[_ngcontent-%COMP%]{border-bottom:1px solid var(--divider-color)}.questions-table[_ngcontent-%COMP%] tr[_ngcontent-%COMP%]:hover{background-color:var(--hover-background)}.questions-table[_ngcontent-%COMP%] .question-text-cell[_ngcontent-%COMP%]{max-width:400px;line-height:1.5}.questions-table[_ngcontent-%COMP%] mat-chip[_ngcontent-%COMP%]{display:inline-flex;align-items:center;gap:.25rem;font-size:.875rem}.questions-table[_ngcontent-%COMP%] mat-chip[_ngcontent-%COMP%] mat-icon[_ngcontent-%COMP%]{font-size:1rem;width:1rem;height:1rem}.questions-table[_ngcontent-%COMP%] .points-badge[_ngcontent-%COMP%]{display:inline-flex;align-items:center;justify-content:center;min-width:2rem;height:1.5rem;padding:0 .5rem;background-color:var(--primary-color);color:#fff;border-radius:12px;font-size:.875rem;font-weight:500}.questions-table[_ngcontent-%COMP%] .action-buttons[_ngcontent-%COMP%]{display:flex;gap:.25rem}.questions-table[_ngcontent-%COMP%] .action-buttons[_ngcontent-%COMP%] button[_ngcontent-%COMP%]{width:36px;height:36px}.questions-table[_ngcontent-%COMP%] .action-buttons[_ngcontent-%COMP%] button[_ngcontent-%COMP%] mat-icon[_ngcontent-%COMP%]{font-size:1.25rem;width:1.25rem;height:1.25rem}.pagination-container[_ngcontent-%COMP%]{display:flex;justify-content:space-between;align-items:center;padding:1rem;border-top:1px solid var(--divider-color);margin-top:1rem}@media (max-width: 768px){.pagination-container[_ngcontent-%COMP%]{flex-direction:column;gap:1rem}}.pagination-container[_ngcontent-%COMP%] .pagination-info[_ngcontent-%COMP%]{font-size:.875rem;color:var(--text-secondary)}.pagination-container[_ngcontent-%COMP%] .pagination-controls[_ngcontent-%COMP%]{display:flex;align-items:center;gap:.25rem}@media (max-width: 768px){.pagination-container[_ngcontent-%COMP%] .pagination-controls[_ngcontent-%COMP%]{flex-wrap:wrap;justify-content:center}}.pagination-container[_ngcontent-%COMP%] .pagination-controls[_ngcontent-%COMP%] button[_ngcontent-%COMP%]{min-width:40px;height:40px}.pagination-container[_ngcontent-%COMP%] .pagination-controls[_ngcontent-%COMP%] button.active[_ngcontent-%COMP%]{background-color:var(--primary-color);color:#fff}.pagination-container[_ngcontent-%COMP%] .pagination-controls[_ngcontent-%COMP%] button[_ngcontent-%COMP%]:disabled{opacity:.4;cursor:not-allowed}.pagination-container[_ngcontent-%COMP%] .pagination-controls[_ngcontent-%COMP%] .ellipsis[_ngcontent-%COMP%]{padding:0 .5rem;color:var(--text-secondary)}@media (prefers-color-scheme: dark){.admin-questions-container[_ngcontent-%COMP%]{--text-primary: #e0e0e0;--text-secondary: #a0a0a0;--text-disabled: #606060;--divider-color: #404040;--hover-background: rgba(255, 255, 255, .05)}.questions-table[_ngcontent-%COMP%] tr[_ngcontent-%COMP%]:hover{background-color:#ffffff0d}}@media (prefers-color-scheme: light){.admin-questions-container[_ngcontent-%COMP%]{--text-primary: #212121;--text-secondary: #757575;--text-disabled: #bdbdbd;--divider-color: #e0e0e0;--hover-background: rgba(0, 0, 0, .04)}.questions-table[_ngcontent-%COMP%] tr[_ngcontent-%COMP%]:hover{background-color:#0000000a}}"]})};export{Rt as AdminQuestionsComponent};
|