PageSourceSearch

https://esimscompare.com/assets/AdminFooterManager-Dv8d9gq3.js

js esimscompare.com collected 2026-10-04 21:59:01 UTC 18,875 bytes, 6 lines download raw bytes

1import{U as T,be as w,r as m,bm as S,j as e,C as c,z as o,D as d,am as u,y as x,bh as j,I as l,w as v}from"./index-D-8p-HQm.js";import{L as r}from"./label-kaJKB61S.js";import{T as F}from"./textarea-BPvTrLOm.js";import{T as M,b as I,c as E,a as R}from"./tabs-B_51V1Er.js";import{E as i}from"./external-link-M8va-7OB.js";import{S as _}from"./save-D5X6DrUj.js";/**
2 * @license lucide-react v0.462.0 - ISC
3 *
4 * This source code is licensed under the ISC license.
5 * See the LICENSE file in the root directory of this source tree.
6 */const D=T("RotateCcw",[["path",{d:"M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8",key:"1357e3"}],["path",{d:"M3 3v5h5",key:"1xhq8a"}]]),g={companyDescription:"Our platform is a comprehensive database designed to deliver impartial information. It enables you to explore, compare, and select the optimal eSIM plan for uninterrupted connectivity during your international travels.",quickLinksTitle:"Quick Links",countriesLabel:"Countries",countriesPath:"/countries",regionsLabel:"Regions",regionsPath:"/regions",providersLabel:"Providers",providersPath:"/providers",globalPackagesLabel:"Global Packages",globalPackagesPath:"/global-packages",aboutLabel:"About",aboutPath:"/about",popularTitle:"Popular",popularLink1Text:"Find an eSIM in Europe",popularLink1Path:"/regions/europe",popularLink2Text:"Find an eSIM in United States",popularLink2Path:"/countries/united-states",popularLink3Text:"Find an eSIM in Spain",popularLink3Path:"/countries/spain",popularLink4Text:"Find an eSIM in France",popularLink4Path:"/countries/france",popularLink5Text:"Find an eSIM in Mexico",popularLink5Path:"/countries/mexico",popularLink6Text:"Find an eSIM in India",popularLink6Path:"/countries/india",legalInformationTitle:"Legal information",privacyPolicyLabel:"Privacy Policy",privacyPolicyPath:"/privacy-policy",conditionsLabel:"Conditions",conditionsPath:"/terms-conditions",contactLabel:"Contact",contactPath:"/contact",contactsTitle:"Contacts",supportEmail:"[email protected]",copyrightText:"© 2025 EsimsCompare. All rights reserved."},Q=()=>{const{toast:b}=w(),[h,N]=m.useState("en"),{footerContent:p,isLoading:y,upsertFooterContent:L}=S(h),P=p.find(t=>t.section_key==="footer_texts"),[a,n]=m.useState(P?.content||g),k=t=>{N(t)};m.useEffect(()=>{const t=p.find(s=>s.section_key==="footer_texts");n(t?t.content:g)},[p,h]);const f=()=>{const t=p.find(s=>s.section_key==="footer_texts")?.id;L({id:t,language_code:h,section_key:"footer_texts",content:a,display_order:0,is_active:!0})},C=()=>{const t=p.find(s=>s.section_key==="footer_texts");n(t?t.content:g),b({title:"Reset",description:"Form reset to saved content"})};return e.jsx("div",{className:"space-y-6",children:e.jsxs(c,{children:[e.jsxs(o,{children:[e.jsx(d,{children:"Footer Translation Manager"}),e.jsx(u,{children:"Edit footer text for each language. These are the actual texts displayed in your footer."})]}),e.jsx(x,{children:e.jsxs(M,{value:h,onValueChange:k,children:[e.jsx(I,{className:"grid grid-cols-5 mb-6",children:Object.values(j).map(t=>e.jsxs(E,{value:t.code,children:[t.flag," ",t.nativeName]},t.code))}),Object.values(j).map(t=>e.jsx(R,{value:t.code,className:"space-y-6",children:y?e.jsx("p",{children:"Loading..."}):e.jsxs("div",{className:"space-y-6",children:[e.jsxs(c,{children:[e.jsx(o,{children:e.jsx(d,{className:"text-base",children:"Company Description"})}),e.jsx(x,{className:"space-y-4",children:e.jsxs("div",{className:"space-y-2",children:[e.jsx(r,{children:"Description Text"}),e.jsx(F,{value:a.companyDescription||"",onChange:s=>n({...a,companyDescription:s.target.value}),rows:4,placeholder:"Company description..."})]})})]}),e.jsxs(c,{children:[e.jsxs(o,{children:[e.jsx(d,{className:"text-base",children:"Quick Links Section"}),e.jsx(u,{children:"These links navigate to main sections of your site"})]}),e.jsxs(x,{className:"space-y-4",children:[e.jsxs("div",{className:"space-y-2",children:[e.jsx(r,{children:"Section Title"}),e.jsx(l,{value:a.quickLinksTitle||"",onChange:s=>n({...a,quickLinksTitle:s.target.value}),placeholder:"Quick Links"})]}),e.jsxs("div",{className:"grid gap-4 border-t pt-4",children:[e.jsxs("div",{className:"border rounded-lg p-3 space-y-2 bg-muted/20",children:[e.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[e.jsxs("div",{className:"space-y-2",children:[e.jsx(r,{children:"Countries Link Label"}),e.jsx(l,{value:a.countriesLabel||"",onChange:s=>n({...a,countriesLabel:s.target.value}),placeholder:"Countries"})]}),e.jsxs("div",{className:"space-y-2",children:[e.jsx(r,{children:"Manual Path"}),e.jsx(l,{value:a.countriesPath||"",onChange:s=>n({...a,countriesPath:s.target.value}),placeholder:"/countries"})]})]}),e.jsxs("div",{className:"flex items-center gap-2 px-3 py-2 bg-background rounded-md text-xs border",children:[e.jsx(i,{className:"h-3 w-3 text-muted-foreground"}),e.jsx("span",{className:"text-muted-foreground",children:"Preview:"}),e.jsx("code",{className:"font-mono",children:a.countriesPath||"/countries"})]})]}),e.jsxs("div",{className:"border rounded-lg p-3 space-y-2 bg-muted/20",children:[e.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[e.jsxs("div",{className:"space-y-2",children:[e.jsx(r,{children:"Regions Link Label"}),e.jsx(l,{value:a.regionsLabel||"",onChange:s=>n({...a,regionsLabel:s.target.value}),placeholder:"Regions"})]}),e.jsxs("div",{className:"space-y-2",children:[e.jsx(r,{children:"Manual Path"}),e.jsx(l,{value:a.regionsPath||"",onChange:s=>n({...a,regionsPath:s.target.value}),placeholder:"/regions"})]})]}),e.jsxs("div",{className:"flex items-center gap-2 px-3 py-2 bg-background rounded-md text-xs border",children:[e.jsx(i,{className:"h-3 w-3 text-muted-foreground"}),e.jsx("span",{className:"text-muted-foreground",children:"Preview:"}),e.jsx("code",{className:"font-mono",children:a.regionsPath||"/regions"})]})]}),e.jsxs("div",{className:"border rounded-lg p-3 space-y-2 bg-muted/20",children:[e.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[e.jsxs("div",{className:"space-y-2",children:[e.jsx(r,{children:"Providers Link Label"}),e.jsx(l,{value:a.providersLabel||"",onChange:s=>n({...a,providersLabel:s.target.value}),placeholder:"Providers"})]}),e.jsxs("div",{className:"space-y-2",children:[e.jsx(r,{children:"Manual Path"}),e.jsx(l,{value:a.providersPath||"",onChange:s=>n({...a,providersPath:s.target.value}),placeholder:"/providers"})]})]}),e.jsxs("div",{className:"flex items-center gap-2 px-3 py-2 bg-background rounded-md text-xs border",children:[e.jsx(i,{className:"h-3 w-3 text-muted-foreground"}),e.jsx("span",{className:"text-muted-foreground",children:"Preview:"}),e.jsx("code",{className:"font-mono",children:a.providersPath||"/providers"})]})]}),e.jsxs("div",{className:"border rounded-lg p-3 space-y-2 bg-muted/20",children:[e.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[e.jsxs("div",{className:"space-y-2",children:[e.jsx(r,{children:"Global Packages Link Label"}),e.jsx(l,{value:a.globalPackagesLabel||"",onChange:s=>n({...a,globalPackagesLabel:s.target.value}),placeholder:"Global Packages"})]}),e.jsxs("div",{className:"space-y-2",children:[e.jsx(r,{children:"Manual Path"}),e.jsx(l,{value:a.globalPackagesPath||"",onChange:s=>n({...a,globalPackagesPath:s.target.value}),placeholder:"/global-packages"})]})]}),e.jsxs("div",{className:"flex items-center gap-2 px-3 py-2 bg-background rounded-md text-xs border",children:[e.jsx(i,{className:"h-3 w-3 text-muted-foreground"}),e.jsx("span",{className:"text-muted-foreground",children:"Preview:"}),e.jsx("code",{className:"font-mono",children:a.globalPackagesPath||"/global-packages"})]})]}),e.jsxs("div",{className:"border rounded-lg p-3 space-y-2 bg-muted/20",children:[e.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[e.jsxs("div",{className:"space-y-2",children:[e.jsx(r,{children:"About Link Label"}),e.jsx(l,{value:a.aboutLabel||"",onChange:s=>n({...a,aboutLabel:s.target.value}),placeholder:"About"})]}),e.jsxs("div",{className:"space-y-2",children:[e.jsx(r,{children:"Manual Path"}),e.jsx(l,{value:a.aboutPath||"",onChange:s=>n({...a,aboutPath:s.target.value}),placeholder:"/about"})]})]}),e.jsxs("div",{className:"flex items-center gap-2 px-3 py-2 bg-background rounded-md text-xs border",children:[e.jsx(i,{className:"h-3 w-3 text-muted-foreground"}),e.jsx("span",{className:"text-muted-foreground",children:"Preview:"}),e.jsx("code",{className:"font-mono",children:a.aboutPath||"/about"})]})]})]})]})]}),e.jsxs(c,{children:[e.jsxs(o,{children:[e.jsx(d,{className:"text-base",children:"Popular Destinations"}),e.jsx(u,{children:"Configure the 6 popular country/region links shown in the footer"})]}),e.jsxs(x,{className:"space-y-6",children:[e.jsxs("div",{className:"space-y-2",children:[e.jsx(r,{children:"Section Title"}),e.jsx(l,{value:a.popularTitle||"",onChange:s=>n({...a,popularTitle:s.target.value}),placeholder:"Popular"})]}),e.jsxs("div",{className:"border rounded-lg p-4 space-y-3 bg-muted/30",children:[e.jsx("h4",{className:"font-medium text-sm",children:"Popular Link #1"}),e.jsxs("div",{className:"space-y-2",children:[e.jsx(r,{children:"Link Text"}),e.jsx(l,{value:a.popularLink1Text||"",onChange:s=>n({...a,popularLink1Text:s.target.value}),placeholder:"e.g., Find an eSIM in Europe"})]}),e.jsxs("div",{className:"space-y-2",children:[e.jsx(r,{children:"Full Path (manual, e.g., /regions/europe or /countries/spain)"}),e.jsx(l,{value:a.popularLink1Path||"",onChange:s=>n({...a,popularLink1Path:s.target.value}),placeholder:"e.g., /regions/europe, /countries/united-states"})]}),e.jsxs("div",{className:"flex items-center gap-2 px-3 py-2 bg-background rounded-md text-sm border",children:[e.jsx(i,{className:"h-3 w-3 text-muted-foreground"}),e.jsx("span",{className:"text-muted-foreground",children:"Preview URL:"}),e.jsx("code",{className:"font-mono text-xs",children:a.popularLink1Path||"/regions/europe"})]})]}),e.jsxs("div",{className:"border rounded-lg p-4 space-y-3 bg-muted/30",children:[e.jsx("h4",{className:"font-medium text-sm",children:"Popular Link #2"}),e.jsxs("div",{className:"space-y-2",children:[e.jsx(r,{children:"Link Text"}),e.jsx(l,{value:a.popularLink2Text||"",onChange:s=>n({...a,popularLink2Text:s.target.value}),placeholder:"e.g., Find an eSIM in United States"})]}),e.jsxs("div",{className:"space-y-2",children:[e.jsx(r,{children:"Full Path (manual)"}),e.jsx(l,{value:a.popularLink2Path||"",onChange:s=>n({...a,popularLink2Path:s.target.value}),placeholder:"e.g., /countries/united-states"})]}),e.jsxs("div",{className:"flex items-center gap-2 px-3 py-2 bg-background rounded-md text-sm border",children:[e.jsx(i,{className:"h-3 w-3 text-muted-foreground"}),e.jsx("span",{className:"text-muted-foreground",children:"Preview URL:"}),e.jsx("code",{className:"font-mono text-xs",children:a.popularLink2Path||"/countries/united-states"})]})]}),e.jsxs("div",{className:"border rounded-lg p-4 space-y-3 bg-muted/30",children:[e.jsx("h4",{className:"font-medium text-sm",children:"Popular Link #3"}),e.jsxs("div",{className:"space-y-2",children:[e.jsx(r,{children:"Link Text"}),e.jsx(l,{value:a.popularLink3Text||"",onChange:s=>n({...a,popularLink3Text:s.target.value}),placeholder:"e.g., Find an eSIM in Spain"})]}),e.jsxs("div",{className:"space-y-2",children:[e.jsx(r,{children:"Full Path (manual)"}),e.jsx(l,{value:a.popularLink3Path||"",onChange:s=>n({...a,popularLink3Path:s.target.value}),placeholder:"e.g., /countries/spain"})]}),e.jsxs("div",{className:"flex items-center gap-2 px-3 py-2 bg-background rounded-md text-sm border",children:[e.jsx(i,{className:"h-3 w-3 text-muted-foreground"}),e.jsx("span",{className:"text-muted-foreground",children:"Preview URL:"}),e.jsx("code",{className:"font-mono text-xs",children:a.popularLink3Path||"/countries/spain"})]})]}),e.jsxs("div",{className:"border rounded-lg p-4 space-y-3 bg-muted/30",children:[e.jsx("h4",{className:"font-medium text-sm",children:"Popular Link #4"}),e.jsxs("div",{className:"space-y-2",children:[e.jsx(r,{children:"Link Text"}),e.jsx(l,{value:a.popularLink4Text||"",onChange:s=>n({...a,popularLink4Text:s.target.value}),placeholder:"e.g., Find an eSIM in France"})]}),e.jsxs("div",{className:"space-y-2",children:[e.jsx(r,{children:"Full Path (manual)"}),e.jsx(l,{value:a.popularLink4Path||"",onChange:s=>n({...a,popularLink4Path:s.target.value}),placeholder:"e.g., /countries/france"})]}),e.jsxs("div",{className:"flex items-center gap-2 px-3 py-2 bg-background rounded-md text-sm border",children:[e.jsx(i,{className:"h-3 w-3 text-muted-foreground"}),e.jsx("span",{className:"text-muted-foreground",children:"Preview URL:"}),e.jsx("code",{className:"font-mono text-xs",children:a.popularLink4Path||"/countries/france"})]})]}),e.jsxs("div",{className:"border rounded-lg p-4 space-y-3 bg-muted/30",children:[e.jsx("h4",{className:"font-medium text-sm",children:"Popular Link #5"}),e.jsxs("div",{className:"space-y-2",children:[e.jsx(r,{children:"Link Text"}),e.jsx(l,{value:a.popularLink5Text||"",onChange:s=>n({...a,popularLink5Text:s.target.value}),placeholder:"e.g., Find an eSIM in Mexico"})]}),e.jsxs("div",{className:"space-y-2",children:[e.jsx(r,{children:"Full Path (manual)"}),e.jsx(l,{value:a.popularLink5Path||"",onChange:s=>n({...a,popularLink5Path:s.target.value}),placeholder:"e.g., /countries/mexico"})]}),e.jsxs("div",{className:"flex items-center gap-2 px-3 py-2 bg-background rounded-md text-sm border",children:[e.jsx(i,{className:"h-3 w-3 text-muted-foreground"}),e.jsx("span",{className:"text-muted-foreground",children:"Preview URL:"}),e.jsx("code",{className:"font-mono text-xs",children:a.popularLink5Path||"/countries/mexico"})]})]}),e.jsxs("div",{className:"border rounded-lg p-4 space-y-3 bg-muted/30",children:[e.jsx("h4",{className:"font-medium text-sm",children:"Popular Link #6"}),e.jsxs("div",{className:"space-y-2",children:[e.jsx(r,{children:"Link Text"}),e.jsx(l,{value:a.popularLink6Text||"",onChange:s=>n({...a,popularLink6Text:s.target.value}),placeholder:"e.g., Find an eSIM in India"})]}),e.jsxs("div",{className:"space-y-2",children:[e.jsx(r,{children:"Full Path (manual)"}),e.jsx(l,{value:a.popularLink6Path||"",onChange:s=>n({...a,popularLink6Path:s.target.value}),placeholder:"e.g., /countries/india"})]}),e.jsxs("div",{className:"flex items-center gap-2 px-3 py-2 bg-background rounded-md text-sm border",children:[e.jsx(i,{className:"h-3 w-3 text-muted-foreground"}),e.jsx("span",{className:"text-muted-foreground",children:"Preview URL:"}),e.jsx("code",{className:"font-mono text-xs",children:a.popularLink6Path||"/countries/india"})]})]})]})]}),e.jsxs(c,{children:[e.jsxs(o,{children:[e.jsx(d,{className:"text-base",children:"Legal & Contact Information"}),e.jsx(u,{children:"Links to legal pages and contact information"})]}),e.jsxs(x,{className:"space-y-4",children:[e.jsxs("div",{className:"space-y-2",children:[e.jsx(r,{children:"Legal Section Title"}),e.jsx(l,{value:a.legalInformationTitle||"",onChange:s=>n({...a,legalInformationTitle:s.target.value}),placeholder:"Legal information"})]}),e.jsxs("div",{className:"grid gap-4 border-t pt-4",children:[e.jsxs("div",{className:"border rounded-lg p-3 space-y-2 bg-muted/20",children:[e.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[e.jsxs("div",{className:"space-y-2",children:[e.jsx(r,{children:"Privacy Policy Link Label"}),e.jsx(l,{value:a.privacyPolicyLabel||"",onChange:s=>n({...a,privacyPolicyLabel:s.target.value}),placeholder:"Privacy Policy"})]}),e.jsxs("div",{className:"space-y-2",children:[e.jsx(r,{children:"Manual Path"}),e.jsx(l,{value:a.privacyPolicyPath||"",onChange:s=>n({...a,privacyPolicyPath:s.target.value}),placeholder:"/privacy-policy"})]})]}),e.jsxs("div",{className:"flex items-center gap-2 px-3 py-2 bg-background rounded-md text-xs border",children:[e.jsx(i,{className:"h-3 w-3 text-muted-foreground"}),e.jsx("span",{className:"text-muted-foreground",children:"Preview:"}),e.jsx("code",{className:"font-mono",children:a.privacyPolicyPath||"/privacy-policy"})]})]}),e.jsxs("div",{className:"border rounded-lg p-3 space-y-2 bg-muted/20",children:[e.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[e.jsxs("div",{className:"space-y-2",children:[e.jsx(r,{children:"Terms & Conditions Link Label"}),e.jsx(l,{value:a.conditionsLabel||"",onChange:s=>n({...a,conditionsLabel:s.target.value}),placeholder:"Conditions"})]}),e.jsxs("div",{className:"space-y-2",children:[e.jsx(r,{children:"Manual Pat
6h"}),e.jsx(l,{value:a.conditionsPath||"",onChange:s=>n({...a,conditionsPath:s.target.value}),placeholder:"/terms-conditions"})]})]}),e.jsxs("div",{className:"flex items-center gap-2 px-3 py-2 bg-background rounded-md text-xs border",children:[e.jsx(i,{className:"h-3 w-3 text-muted-foreground"}),e.jsx("span",{className:"text-muted-foreground",children:"Preview:"}),e.jsx("code",{className:"font-mono",children:a.conditionsPath||"/terms-conditions"})]})]}),e.jsxs("div",{className:"border rounded-lg p-3 space-y-2 bg-muted/20",children:[e.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[e.jsxs("div",{className:"space-y-2",children:[e.jsx(r,{children:"Contact Link Label"}),e.jsx(l,{value:a.contactLabel||"",onChange:s=>n({...a,contactLabel:s.target.value}),placeholder:"Contact"})]}),e.jsxs("div",{className:"space-y-2",children:[e.jsx(r,{children:"Manual Path"}),e.jsx(l,{value:a.contactPath||"",onChange:s=>n({...a,contactPath:s.target.value}),placeholder:"/contact"})]})]}),e.jsxs("div",{className:"flex items-center gap-2 px-3 py-2 bg-background rounded-md text-xs border",children:[e.jsx(i,{className:"h-3 w-3 text-muted-foreground"}),e.jsx("span",{className:"text-muted-foreground",children:"Preview:"}),e.jsx("code",{className:"font-mono",children:a.contactPath||"/contact"})]})]})]}),e.jsxs("div",{className:"border-t pt-4 space-y-4",children:[e.jsxs("div",{className:"space-y-2",children:[e.jsx(r,{children:"Contacts Section Title"}),e.jsx(l,{value:a.contactsTitle||"",onChange:s=>n({...a,contactsTitle:s.target.value}),placeholder:"Contacts"})]}),e.jsxs("div",{className:"space-y-2",children:[e.jsx(r,{children:"Support Email"}),e.jsx(l,{type:"email",value:a.supportEmail||"",onChange:s=>n({...a,supportEmail:s.target.value}),placeholder:"[email protected]"})]})]})]})]}),e.jsxs(c,{children:[e.jsx(o,{children:e.jsx(d,{className:"text-base",children:"Copyright"})}),e.jsx(x,{className:"space-y-4",children:e.jsxs("div",{className:"space-y-2",children:[e.jsx(r,{children:"Copyright Text"}),e.jsx(l,{value:a.copyrightText||"",onChange:s=>n({...a,copyrightText:s.target.value}),placeholder:"© 2025 EsimsCompare. All rights reserved."})]})})]}),e.jsxs("div",{className:"flex gap-2",children:[e.jsxs(v,{onClick:f,size:"lg",children:[e.jsx(_,{className:"w-4 h-4 mr-2"}),"Save ",t.nativeName," Footer"]}),e.jsxs(v,{variant:"outline",onClick:C,size:"lg",children:[e.jsx(D,{className:"w-4 h-4 mr-2"}),"Reset"]})]})]})},t.code))]})})]})})};export{Q as AdminFooterManager};

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.