1import{r,j as t}from"./vendor-react-CYOoHjOf.js";import{aH as h,aK as p,cg as A,aV as j}from"./vendor-mui-A_M4pNO3.js";import{b as f,T as s,i as M,h as I,a as P,o as T,fI as N,M as $,j as b,L as O}from"./index-NXCSpy0w.js";import{R as S}from"./ReturnButton-C43vaIAe.js";import{U as m,Q as c}from"./mypage.types-BZip3ud9.js";import"./vendor-redux-BXotTMQH.js";import"./vendor-lodash-Cp5T_Ztg.js";import"./vendor-axios-BLlBCaos.js";import"./vendor-auth-DXBuXNeD.js";import"./vendor-motion-CwbUqb9k.js";const d="OptionalQuestionScreen",a={notification:`${d}-notification`,textMiddle:`${d}-textMiddle`,buttonPrimary:`${d}-buttonPrimary`},E=h(p)(({theme:e})=>({[`& .${a.notification}`]:{background:e.palette.warning.lightBg,color:e.palette.warning.dark,cursor:"pointer","& p":{color:e.palette.warning.darkText}},[`& .${a.textMiddle}`]:{marginLeft:8,marginRight:"auto"},[`& .${a.buttonPrimary}`]:{height:42,marginTop:40}})),q="OptionalQuestionItem",y={border:`${q}-border`},v=h(p)(({theme:e})=>({[`&.${y.border}`]:{border:"1px solid",borderColor:e.palette.divider,borderRadius:4,padding:"16px 14px 16px 16px"}})),B=({data:e})=>{const{isFreeMember:n}=f(),u=r.useMemo(()=>e.optionalQuestionAnswer?e.optionalQuestionAnswer.answer?e.questionType.questionTypeName===c.checkbox?e.optionalQuestionAnswer.answer.split(",").reduce((w,x,Q)=>`${w}${Q>0?",":""}${e.itemsForQuestions.find(g=>g.id===+x)?.itemName||x}`,""):[c.radio,c.select].includes(e.questionType.questionTypeName)&&e.itemsForQuestions.find(o=>o.id.toString()===e.optionalQuestionAnswer.answer)?.itemName||e.optionalQuestionAnswer.answer:!e.optionalQuestionAnswer.skipEndDate&&!(n&&e.toFreeMember===m.require||!n&&e.toPaidMember===m.require)?"å
¥åå¤ãªãã§åçæ¸ã¿":"æªåç":"æªåç",[e.itemsForQuestions,e.optionalQuestionAnswer,e.questionType.questionTypeName,e.toFreeMember,e.toPaidMember,n]),i=r.useMemo(()=>!e.optionalQuestionAnswer||!e.optionalQuestionAnswer?.answer,[e.optionalQuestionAnswer]),l=r.useMemo(()=>e[n?"toFreeMember":"toPaidMember"]!==m.require,[e,n]);return t.jsxs(p,{width:"100%",mt:6,children:[t.jsxs(s,{variant:"body2",customColor:"text.secondary",marginBottom:8,children:[e.questionTitle,l&&"ï¼ä»»æï¼"]}),t.jsx(s,{variant:"body2",marginBottom:8,children:e.question}),t.jsx(v,{className:y.border,children:t.jsx(s,{variant:"body2",customColor:i?"text.disabled":"text.primary",whiteSpace:"pre-wrap",children:u})})]})},F=r.memo(B),R=()=>{const e=M(),n=I(),{fanclubSpecificProfileId:u}=f(),{optionalQuestionItemsByMember:i}=P(o=>o.mypage),l=r.useMemo(()=>i.length===0?!1:!!i?.find(o=>o.isAnswer),[i]);return r.useEffect(()=>{const o=T();o&&u&&e(N({fanclubSiteId:o,fanclubSpecificProfileId:u}))},[e,u]),t.jsxs(E,{p:6,maxWidth:504,mx:"auto",width:"100%",children:[t.jsx(p,{mb:2,children:t.jsx(S,{variant:"text",text:void 0,path:$.MY_PAGE})}),t.jsx(s,{variant:"h5",marginBottom:24,children:"ã¢ã³ã±ã¼ãã®åç"}),i.length===0?t.jsx(s,{variant:"body2",children:"ç¾å¨ãåçãåãä»ãã¦ããã¢ã³ã±ã¼ãã¯ããã¾ãã"}):t.jsxs(t.Fragment,{children:[l&&t.jsxs(p,{mt:6,display:"flex",alignItems:"center",justifyContent:"space-between",px:4,py:2,borderRadius:"4px",className:a.notification,onClick:()=>n.push(b.UPDATE_OPTIONAL_QUESTION),children:[t.jsx(A,{}),t.jsx(s,{variant:"body2",className:a.textMiddle,children:"æªåçã®è³ªåããããã¾ã"}),t.jsx(s,{fontSize:12,children:"åç"})]}),i.map(o=>t.jsx(F,{data:o},o.id)),l&&t.jsx(j,{variant:"contained",component:O,color:"primary",fullWidth:!0,to:b.UPDATE_OPTIONAL_QUESTION,className:a.buttonPrimary,children:"æªåçã®è³ªåã«åç"})]})]})},z=r.memo(R);export{z as default};
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.