1import{M as G}from"./DIpSCz-v.js";import{F as r}from"./-COHRjvS.js";import{F as $}from"./D_yAoySS.js";import{F as P}from"./ByjTMUYX.js";import{b as q,c as U}from"./h5-bx75Z.js";import{U as S}from"./DJwvPUyS.js";import{u as H}from"./CdasQrlT.js";import{u as J}from"./DCWHEqtW.js";import{d as K}from"./NBAthv48.js";import{b as Q}from"#entry";import{A as X,r as Y,c as D,a as x,w as Z,a9 as _,ab as y,ag as d,aj as n,aa as w,ah as M,ai as t,u as l,as as h,i as ee}from"./Cqga2mdz.js";import"./CZw8qzHT.js";import"./C1omvcmS.js";import"./CoP9UDNJ.js";import"./DwH2E4Yy.js";import"./35TM4mrt.js";import"./rkqKn9aX.js";import"./D-WKdy0Y.js";import"./BI8w7J0G.js";import"./DuiFmdnP.js";import"./Bh4YzkF1.js";const ae={class:"space-y-6"},le={class:"space-y-3"},se={key:0,class:"ml-1"},oe={class:"space-y-3"},te={class:"space-y-3"},ie={key:0},ne={class:"space-y-4"},re=X({__name:"ModalUserSettings",props:{isOpen:{type:Boolean}},emits:["close","refresh"],setup(A,{emit:L}){const V=A,g=L,{villageId:b}=J(),{situation:O,loadSituation:F}=q(),{paging:c,messageDisplay:u,theme:C,operation:v,setPaging:N,setMessageDisplay:I,setTheme:T,setOperation:W}=H(),{apiCall:E}=Q(),f=Y(!1),p=D({get:()=>V.isOpen,set:i=>{i||g("close")}}),m=D(()=>O.value?.participate.myself),s=x({isPaging:!0,messagePerPage:50,isDispDate:!1,isCharLarge:!1,isImgLarge:!1,isDarkTheme:!1,isOpenFilterNewtab:!1,isPasteAnchor:!1}),a=x({discordWebhookUrl:"",notifyStartVillage:!1,notifyDaychange:!1,notifyEpilogueVillage:!1,notifySecretMessage:!1,notifyAnchorMessage:!1,notifyAbilitySayMessage:!1,keywords:""}),B=[{label:"10",value:10},{label:"20",value:20},{label:"50",value:50},{label:"100",value:100},{label:"200",value:200}];Z(()=>V.isOpen,i=>{i&&j()});const j=()=>
1{if(s.isPaging=c.value.isPaging,s.messagePerPage=c.value.messagePerPage,s.isDispDate=u.value.isDispDate,s.isCharLarge=u.value.isCharLarge,s.isImgLarge=u.value.isImgLarge,s.isDarkTheme=C.value.isDark,s.isOpenFilterNewtab=v.value.isOpenFilterNewtab,s.isPasteAnchor=v.value.isPasteAnchor,m.value?.notification){const i=m.value.notification;a.discordWebhookUrl=i.discord_webhook_url??"",a.notifyStartVillage=i.village?.start??!1,a.notifyDaychange=i.village?.day_change??!1,a.notifyEpilogueVillage=i.village?.epilogue??!1,a.notifySecretMessage=i.message?.secret_say??!1,a.notifyAnchorMessage=i.message?.anchor??!1,a.notifyAbilitySayMessage=i.message?.ability_say??!1,a.keywords=i.message?.keywords?.join(" ")??""}else a.discordWebhookUrl="",a.notifyStartVillage=!1,a.notifyDaychange=!1,a.notifyEpilogueVillage=!1,a.notifySecretMessage=!1,a.notifyAnchorMessage=!1,a.notifyAbilitySayMessage=!1,a.keywords=""},z=async()=>{f.value=!0;try{N({isPaging:s.isPaging,messagePerPage:s.messagePerPage}),I({isDispDate:s.isDispDate,isCharLarge:s.isCharLarge,isImgLarge:s.isImgLarge}),T({isDark:s.isDarkTheme}),W({isOpenFilterNewtab:s.isOpenFilterNewtab,isPasteAnchor:s.isPasteAnchor}),m.value&&a.discordWebhookUrl&&(await R(),await F()),g("refresh"),k(),K("è¨å®ãä¿åãã¾ãã")}catch(i){console.error("è¨å®ã®ä¿åã«å¤±æãã¾ãã:",i)}finally{f.value=!1}},R=async()=>{b.value&&await E(`/village/${b.value}/notification-setting`,{method:"POST",body:{webhook_url:a.discordWebhookUrl,village_start:a.notifyStartVillage,village_daychange:a.notifyDaychange,village_epilogue:a.notifyEpilogueVillage,secret_say:a.notifySecretMessage,ability_say:a.notifyAbilitySayMessage,anchor_say:a.notifyAnchorMessage,keyword:a.keywords}})},k=()=>{g("close")};return(i,e)=>(y(),_(G,{modelValue:l(p),"onUpdate:modelValue":e[16]||(e[16]=o=>ee(p)?p.value=o:null),title:"ã¦ã¼ã¶è¨å®"},{footer:d(()=>[t(S,{color:"secondary",variant:"outline",onClick:k},{default:d(()=>[...e[23]||(e[23]=[h("éãã",-1)])]),_:1}),t(S,{color:"primary",loading:l(f),onClick:z},{default:d(()=>[...e[24]||(e[24]=[h(" ä¿åãã ",-1)])]),_:1},8,["loading"])]),default:d(()=>[n("div",ae,[n("section",null,[e[18]||(e[18]=n("h4",{class:"mb-3 text-sm font-semibold text-gray-700 dark:text-gray-300"}," ãã¼ã¸åå² ",-1)),n("div",le,[t(r,{modelValue:l(s).isPaging,"onUpdate:modelValue":e[0]||(e[0]=o=>l(s).isPaging=o),label:"ãã¼ã¸åå²ãã"},null,8,["modelValue"]),l(s).isPaging?(y(),w("div",se,[e[17]||(e[17]=n("label",{class:"mb-1 block text-xs text-gray-600 dark:text-gray-400"}," 1ãã¼ã¸ãããã®çºè¨æ° ",-1)),t($,{modelValue:l(s).messagePerPage,"onUpdate:modelValue":e[1]||(e[1]=o=>l(s).messagePerPage=o),options:B,size:"sm",class:"max-w-[150px]"},null,8,["modelValue"])])):M("",!0)])]),n("section",null,[e[19]||(e[19]=n("h4",{class:"mb-3 text-sm font-semibold text-gray-700 dark:text-gray-300"}," çºè¨è¡¨ç¤º ",-1)),n("div",oe,[t(r,{modelValue:l(s).isDispDate,"onUpdate:modelValue":e[2]||(e[2]=o=>l(s).isDispDate=o),label:"æ¥ä»ã表示ãã"},null,8,["modelValue"]),t(r,{modelValue:l(s).isCharLarge,"onUpdate:modelValue":e[3]||(e[3]=o=>l(s).isCharLarge=o),label:"æåã大ãã表示ãã"},null,8,["modelValue"]),t(r,{modelValue:l(s).isImgLarge,"onUpdate:modelValue":e[4]||(e[4]=o=>l(s).isImgLarge=o),label:"ãã£ã©ç»åã大ãã表示ãã"},null,8,["modelValue"])])]),n("section",null,[e[20]||(e[20]=n("h4",{class:"mb-3 text-sm font-semibold text-gray-700 dark:text-gray-300"}," ãã¼ã ",-1)),t(r,{modelValue:l(s).isDarkTheme,"onUpdate:modelValue":e[5]||(e[5]=o=>l(s).isDarkTheme=o),label:"ãã¼ã¯ãã¼ãã«ãã"},null,8,["modelValue"])]),n("section",null,[e[21]||(e[21]=n("h4",{class:"mb-3 text-sm font-semibold text-gray-700 dark:text-gray-300"}," æä½ ",-1)),n("div",te,[t(r,{modelValue:l(s).isOpenFilterNewtab,"onUpdate:modelValue":e[6]||(e[6]=o=>l(s).isOpenFilterNewtab=o),label:"å人æ½åºãå¥ã¿ãã§éã"},null,8,["modelValue"]),t(r,{modelValue:l(s).isPasteAnchor,"onUpdate:modelValue":e[7]||(e[7]=o=>l(s).isPasteAnchor=o),label:"ã¢ã³ã«ã¼ã¯ãªãã¯æã«çºè¨æ¬ã«è²¼ãä»ãã"},null,8,["modelValue"])])]),l(m)?(y(),w("section",ie,[e[22]||(e[22]=n("h4",{class:"mb-3 text-sm font-semibold text-gray-700 dark:text-gray-300"}," éç¥ ",-1)),n("div",ne,[t(U,{label:"Webhook URL"},{default:d(()=>[t(P,{modelValue:l(a).discordWebhookUrl,"onUpdate:modelValue":e[8]||(e[8]=o=>l(a).discordWebhookUrl=o),type:"text",placeholder:"Discordã®Webhook URL",maxlength:200,size:"sm"},null,8,["modelValue"])]),_:1}),t(r,{modelValue:l(a).notifyStartVillage,"onUpdate:modelValue":e[9]||(e[9]=o=>l(a).notifyStartVillage=o),label:"æéå§éç¥",description:"é²è¡ä¸ã«é·ç§»ããééç¥ãã"},null,8,["modelValue"]),t(r,{modelValue:l(a).notifyDaychange,"onUpdate:modelValue":e[10]||(e[10]=o=>l(a).notifyDaychange=o),label:"æ¥ä»æ´æ°éç¥",description:"æ¥ä»ãæ´æ°ãããéã«éç¥ãã"},null,8,["modelValue"]),t(r,{modelValue:l(a).notifyEpilogueVillage,"onUpdate:modelValue":e[11]||(e[11]=o=>l(a).notifyEpilogueVillage=o),label:"ã¨ããã¼ã°éç¥",description:"ã¨ããã¼ã°ã«é·ç§»ããéã«éç¥ãã"},null,8,["modelValue"]),t(r,{modelValue:l(a).notifySecretMessage,"onUpdate:modelValue":e[12]||(e[12]=o=>l(a).notifySecretMessage=o),label:"ç§è©±éç¥",description:"ç§è©±ãåãåã£ãéã«éç¥ãã"},null,8,["modelValue"]),t(r,{modelValue:l(a).notifyAnchorMessage,"onUpdate:modelValue":e[13]||(e[13]=o=>l(a).notifyAnchorMessage=o),label:"ã¢ã³ã«ã¼æå®éç¥",description:"ããªãã®çºè¨ãã¢ã³ã«ã¼æå®ãããéã«éç¥ãã"},null,8,["modelValue"]),t(r,{modelValue:l(a).notifyAbilitySayMessage,"onUpdate:modelValue":e[14]||(e[14]=o=>l(a).notifyAbilitySayMessage=o),label:"å½¹è·çªçºè¨éç¥",description:"å½¹è·çªçºè¨ãåãåã£ãéã«éç¥ãã"},null,8,["modelValue"]),t(U,{label:"ãã¼ã¯ã¼ãéç¥"},{default:d(()=>[t(P,{modelValue:l(a).keywords,"onUpdate:modelValue":e[15]||(e[15]=o=>l(a).keywords=o),type:"text",placeholder:"ã¹ãã¼ã¹åºåãã§30æåã¾ã§",maxlength:30,size:"sm"},null,8,["modelValue"])]),_:1})])])):M("",!0)])]),_:1},8,["modelValue"]))}}),Le=Object.assign(re,{__name:"PagesVillageSidebarModalUserSettings"});export{Le 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.