"use strict";const s=require("react/jsx-runtime"),e=require("./sl-types.js"),j=require("./index12.js"),u=require("./index9.js"),c=require("./index6.js"),t=require("./useStreamLayerApp2.js"),r=e.styled_default("div")({name:"QuestionItem",class:"q1w97g3p",propsAsIs:!1}),S=e.styled_default("div")({name:"QuestionCaption",class:"q2sl39u",propsAsIs:!1}),A=e.styled_default("div")({name:"QuestionBody",class:"qd5h0uc",propsAsIs:!1}),Q=e.styled_default("div")({name:"QuestionAction",class:"q105uluy",propsAsIs:!1}),T=()=>c.B1,i=e.styled_default(T())({name:"QuestionActionIcon",class:"q1fa0b9h",propsAsIs:!0}),f=()=>i,_=e.styled_default(f())({name:"QuestionCheckIcon",class:"qxlt78s",propsAsIs:!0}),h=()=>c.B1,k=e.styled_default(h())({name:"QuestionTypeIcon",class:"qmg0vkx",propsAsIs:!0}),v=e.styled_default("div")({name:"QuestionTypeLabel",class:"q1uz5j1g",propsAsIs:!1}),L=e.styled_default("div")({name:"QuestionContent",class:"qc3icwa",propsAsIs:!1}),p=e.styled_default("button")({name:"PlayButton",class:"p169lohr",propsAsIs:!1}),P=e.styled_default("div")({name:"SkeletonContainer",class:"s1f43z3r",propsAsIs:!1}),E=()=>u.e,N=e.styled_default(E())({name:"SkeletonButton",class:"s16k8geu",propsAsIs:!0}),b={[t.PickHistoryStatus.LOST]:s.jsx(i,{name:"incorrectVoted"}),[t.PickHistoryStatus.WON]:s.jsx(_,{name:"icon-check"}),[t.PickHistoryStatus.UNSET]:s.jsx(i,{name:"icon-arrow"}),[t.PickHistoryStatus.DNP]:s.jsx(i,{name:"icon-arrow"})},g=()=>s.jsxs(P,{children:[s.jsx(u.i,{loading:!0,style:{width:"35%"}}),s.jsx(u.i,{loading:!0,style:{width:"70%"}}),s.jsx(N,{})]}),y=({questionTypeData:a,questionType:n,questionStatus:o})=>s.jsxs(S,{className:"SL_QuestionCaption",children:[s.jsx(k,{className:"SL_QuestionTypeIcon","data-testid":"question-type-icon","data-type-trivia":n===t.QuestionType.TRIVIA,"data-type-poll":n===t.QuestionType.POLL,name:a.iconName}),s.jsxs(v,{className:"SL_QuestionTypeLabel",children:[a.label,n===t.QuestionType.TRIVIA&&o===t.QuestionStatus.RESOLVED&&" • Expired"]})]}),w=({questionId:a,questionType:n,questionStatus:o,subject:m,openForVoting:q,status:x})=>{const l=j.e[n],I=b[x];return l?s.jsxs(r,{"data-a":"intr","data-name":a,children:[s.jsxs(L,{children:[s.jsx(y,{questionTypeData:l,questionType:n,questionStatus:o}),s.jsx(A,{children:m||""})]}),s.jsx(Q,{children:q?s.jsx(p,{"data-a":"intr","data-name":a,children:"Play"}):I})]}):null};var d;(function(a){a.OPENED="opened"})(d||(d={}));exports.D=g;exports.R=w;exports.S=p;exports.r=r;exports.x=y;
