1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[7507],{6845:e=>{e.exports={container:"formats_container__tzNCA",content:"formats_content__Oylcv",filterControls:"formats_filterControls__J_BWC",form:"formats_form__Of81v",input:"formats_input__ADSrW",controls:"formats_controls__SPH8U",data:"formats_data__7zx3M",formatCard:"formats_formatCard__Cx8rL",description:"formats_description__TYx3S"}},25155:(e,s,r)=>{(window.__NEXT_P=window.__NEXT_P||[]).push(["/moderation/deck-formats",function(){return r(88737)}])},31452:(e,s,r)=>{"use strict";r.d(s,{A:()=>c});var t=r(75038);r(76430);var a=r(40120),n=r(92910),i=r(97633),o=r.n(i);let c=({main:e,secondary:s,href:r,onClick:i})=>(0,t.jsxs)("div",{className:o().container,children:[(0,t.jsx)("h3",{id:e.replace(" ","_"),children:e}),r&&s&&(0,t.jsxs)(n.A,{href:r,children:[s," ",(0,t.jsx)(a.A,{name:"arrow right"})]}),i&&s&&(0,t.jsxs)("button",{onClick:i,children:[s," ",(0,t.jsx)(a.A,{name:"arrow right"})]}),!r&&!i&&s&&s]})},88737:(e,s,r)=>{"use strict";r.r(s),r.d(s,{__N_SSP:()=>v,default:()=>A});var t=r(75038),a=r(76430),n=r(98381),i=r(21159),o=r(36601);class c extends o.B{list=async()=>super.get("/api/decks/formats/");update=async e=>super.patch(`/api/decks/formats/${e.id}/`,e)}let l=new c;var d=r(79761),m=r(31452),_=r(76975),f=r(69133),h=r(40120),x=r(68835),p=r(550),u=r(6845),j=r.n(u),v=!0;let A=({res:e})=>{let s=(0,n.useRouter)(),[r,o]=(0,a.useState)(!1),[c,u]=(0,a.useState)(!1),[v,A]=(0,a.useState)(null),C=()=>{A(null),o(!1)};return(0,t.jsx)(d.A,{title:"Deck formats configuration",robots:"noindex",className:j().container,children:(0,t.jsxs)("div",{className:j().content,children:[(0,t.jsxs)(_.A,{open:r,onClose:C,children:[(0,t.jsxs)("h4",{children:["Edit ",v?.formatname," description"]}),v&&(0,t.jsxs)("form",{onSubmit:e=>{v&&(e.preventDefault(),u(!0),l.update(v).then(()=>{i.A.create("Updated deck format description","Deck format service","success"),C(),s.replace(s.asPath)}).catch(e=>i.A.create(e,"Deck format service","error")).finally(()=>u(!1)))},className:j().form,children:[(0,t.jsx)(p.A,{noResize:!0,header:"Description",maxCharacters:2048,onChange:e=>A({...v,description:e}),placeholder:"This format does X, Y, and Z...",value:v.description}),(0,t.jsxs)("div",{className:j().controls,children:[(0,t.jsx)(x.A,{type:"button",disabled:c,color:"red",onClick:C,children:"Cancel"}),(0,t.jsx)(x.A,{disabled:c,color:"green",type:"submit",children:c?(0,t.jsx)(f.A,{size:"xSmall"}):"Submit"})]})]})]}),(0,t.jsx)(m.A,{main:`Deck formats (${e.results.length})`}),(0,t.jsx)("div",{className:j().data,children:e.results.map(e=>(0,t.jsxs)("div",{className:j().formatCard,children:[(0,t.jsxs)("div",{children:["Name: ",e.formatname]}),(0,t.jsxs)("div",{children:["Internal identifier: ",e.legalityname]}),(0,t.jsxs)("p",{children:["Description: ",e.description||"No description"]}),(0,t.jsx)("div",{className:j().controls,children:(0,t.jsxs)(x.A,{onClick:()=>{A(e),o(!0)},children:[(0,t.jsx)(h.A,{name:"edit"})," Edit"]})})]},e.id))})]})})}},97633:e=>{e.exports={flex:"header_flex__ZExkp",container:"header_container__Pg3wx"}}},e=>{e.O(0,[636,6593,8792],()=>e(e.s=25155)),_N_E=e.O()}]); 2//# sourceMappingURL=deck-formats-70314655e9dae274.js.map
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.